prefs: add get_/set_ignore_request_hide_titlebar ()
Enables the possibility to ignore GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED to prevent hiding the titlebar of applications even if they requested so. https://bugzilla.gnome.org/show_bug.cgi?id=678947
This commit is contained in:
parent
f65b7c59d3
commit
78c966321a
@ -96,6 +96,7 @@ static int draggable_border_width = 10;
|
||||
static gboolean resize_with_right_button = FALSE;
|
||||
static gboolean edge_tiling = FALSE;
|
||||
static gboolean force_fullscreen = TRUE;
|
||||
static gboolean ignore_request_hide_titlebar = FALSE;
|
||||
|
||||
static GDesktopVisualBellType visual_bell_type = G_DESKTOP_VISUAL_BELL_FULLSCREEN_FLASH;
|
||||
static MetaButtonLayout button_layout;
|
||||
@ -2149,3 +2150,15 @@ meta_prefs_set_force_fullscreen (gboolean whether)
|
||||
{
|
||||
force_fullscreen = whether;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_prefs_get_ignore_request_hide_titlebar (void)
|
||||
{
|
||||
return ignore_request_hide_titlebar;
|
||||
}
|
||||
|
||||
void
|
||||
meta_prefs_set_ignore_request_hide_titlebar (gboolean whether)
|
||||
{
|
||||
ignore_request_hide_titlebar = whether;
|
||||
}
|
||||
|
@ -1600,7 +1600,7 @@ reload_gtk_hide_titlebar_when_maximized (MetaWindow *window,
|
||||
gboolean requested_value = FALSE;
|
||||
gboolean current_value = window->hide_titlebar_when_maximized;
|
||||
|
||||
if (value->type != META_PROP_VALUE_INVALID)
|
||||
if (!meta_prefs_get_ignore_request_hide_titlebar () && value->type != META_PROP_VALUE_INVALID)
|
||||
{
|
||||
requested_value = ((int) value->v.cardinal == 1);
|
||||
meta_verbose ("Request to hide titlebar for window %s.\n", window->desc);
|
||||
|
@ -131,6 +131,9 @@ void meta_prefs_set_no_tab_popup (gboolean whether);
|
||||
|
||||
int meta_prefs_get_draggable_border_width (void);
|
||||
|
||||
gboolean meta_prefs_get_ignore_request_hide_titlebar (void);
|
||||
void meta_prefs_set_ignore_request_hide_titlebar (gboolean whether);
|
||||
|
||||
/* XXX FIXME This should be x-macroed, but isn't yet because it would be
|
||||
* difficult (or perhaps impossible) to add the suffixes using the current
|
||||
* system. It needs some more thought, perhaps after the current system
|
||||
|
Loading…
Reference in New Issue
Block a user