mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
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
This commit is contained in:
parent
8a7a01b0cf
commit
34ac80348c
@ -401,48 +401,6 @@ rect_for_function (MetaFrameGeometry *fgeom,
|
|||||||
MetaButtonFunction function,
|
MetaButtonFunction function,
|
||||||
MetaTheme *theme)
|
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)
|
switch (function)
|
||||||
{
|
{
|
||||||
case META_BUTTON_FUNCTION_MENU:
|
case META_BUTTON_FUNCTION_MENU:
|
||||||
@ -476,10 +434,9 @@ rect_for_function (MetaFrameGeometry *fgeom,
|
|||||||
case META_BUTTON_FUNCTION_UNSTICK:
|
case META_BUTTON_FUNCTION_UNSTICK:
|
||||||
case META_BUTTON_FUNCTION_UNSHADE:
|
case META_BUTTON_FUNCTION_UNSHADE:
|
||||||
case META_BUTTON_FUNCTION_UNABOVE:
|
case META_BUTTON_FUNCTION_UNABOVE:
|
||||||
/* we are being asked for a >v1 button which hasn't been handled yet,
|
/* Fringe buttons that used to be supported by theme versions >v1;
|
||||||
* so obviously we're not in a theme which supports that version.
|
* if we want to support them again, we need to return the
|
||||||
* therefore, we don't show the button. return NULL and all will
|
* correspondings rects here
|
||||||
* be well.
|
|
||||||
*/
|
*/
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user