From 34ac80348ca74a1dd0ce25c585592f283c349d90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 30 Sep 2014 13:49:52 +0200 Subject: [PATCH] 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 file changed, 3 insertions(+), 46 deletions(-) diff --git a/src/ui/theme.c b/src/ui/theme.c index c96858ce9..257824cca 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;