[mutter] theme: Disable support for fringe buttons
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] theme: Disable support for fringe buttons
- Date: Mon, 29 Dec 2014 16:58:34 +0000 (UTC)
commit 34ac80348ca74a1dd0ce25c585592f283c349d90
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Sep 30 13:49:52 2014 +0200
theme: Disable support for fringe buttons
Few themes ever had support for those in the first place, and even
less supported them properly; in particular support in the default
theme has been broken for a while now.
With this in mind (and considering that not even the tweak tool exposes
any UI to configure them), let's (try to) remove support altogether - the
corresponding rects are still kept around, so it's easy to add back in
case we reconsider (and get the necessary artwork).
https://bugzilla.gnome.org/show_bug.cgi?id=741917
src/ui/theme.c | 49 +++----------------------------------------------
1 files changed, 3 insertions(+), 46 deletions(-)
---
diff --git a/src/ui/theme.c b/src/ui/theme.c
index c96858c..257824c 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -401,48 +401,6 @@ rect_for_function (MetaFrameGeometry *fgeom,
MetaButtonFunction function,
MetaTheme *theme)
{
-
- /* Firstly, check version-specific things. */
-
- if (META_THEME_ALLOWS(theme, META_THEME_SHADE_STICK_ABOVE_BUTTONS))
- {
- switch (function)
- {
- case META_BUTTON_FUNCTION_SHADE:
- if ((flags & META_FRAME_ALLOWS_SHADE) && !(flags & META_FRAME_SHADED))
- return &fgeom->shade_rect;
- else
- return NULL;
- case META_BUTTON_FUNCTION_ABOVE:
- if (!(flags & META_FRAME_ABOVE))
- return &fgeom->above_rect;
- else
- return NULL;
- case META_BUTTON_FUNCTION_STICK:
- if (!(flags & META_FRAME_STUCK))
- return &fgeom->stick_rect;
- else
- return NULL;
- case META_BUTTON_FUNCTION_UNSHADE:
- if ((flags & META_FRAME_ALLOWS_SHADE) && (flags & META_FRAME_SHADED))
- return &fgeom->unshade_rect;
- else
- return NULL;
- case META_BUTTON_FUNCTION_UNABOVE:
- if (flags & META_FRAME_ABOVE)
- return &fgeom->unabove_rect;
- else
- return NULL;
- case META_BUTTON_FUNCTION_UNSTICK:
- if (flags & META_FRAME_STUCK)
- return &fgeom->unstick_rect;
- default:
- /* just go on to the next switch block */;
- }
- }
-
- /* now consider the buttons which exist in all versions */
-
switch (function)
{
case META_BUTTON_FUNCTION_MENU:
@@ -476,10 +434,9 @@ rect_for_function (MetaFrameGeometry *fgeom,
case META_BUTTON_FUNCTION_UNSTICK:
case META_BUTTON_FUNCTION_UNSHADE:
case META_BUTTON_FUNCTION_UNABOVE:
- /* we are being asked for a >v1 button which hasn't been handled yet,
- * so obviously we're not in a theme which supports that version.
- * therefore, we don't show the button. return NULL and all will
- * be well.
+ /* Fringe buttons that used to be supported by theme versions >v1;
+ * if we want to support them again, we need to return the
+ * correspondings rects here
*/
return NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]