mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
x11: Remove hide-titlebar-when-maximized support
It's a UI pattern that has been superseded by client-side decorations, apps that used to set the hint have generally moved on to headerbars. Given that and the limitation to server-side decorated X11 windows, GTK4 removed the client-side API for setting the hint, it's time to follow suite and retire the feature. https://gitlab.gnome.org/GNOME/mutter/merge_requests/221
This commit is contained in:
parent
ca7c5c1223
commit
6e1b14b26b
@ -110,7 +110,6 @@ static int drag_threshold;
|
||||
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 gboolean auto_maximize = TRUE;
|
||||
static gboolean show_fallback_app_menu = FALSE;
|
||||
|
||||
@ -2085,15 +2084,3 @@ 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;
|
||||
}
|
||||
|
@ -189,7 +189,6 @@ struct _MetaWindow
|
||||
char *gtk_app_menu_object_path;
|
||||
char *gtk_menubar_object_path;
|
||||
|
||||
int hide_titlebar_when_maximized;
|
||||
int net_wm_pid;
|
||||
|
||||
Window xtransient_for;
|
||||
|
@ -7708,9 +7708,7 @@ meta_window_get_frame_type (MetaWindow *window)
|
||||
/* can't add border if undecorated */
|
||||
return META_FRAME_TYPE_LAST;
|
||||
}
|
||||
else if (window->border_only ||
|
||||
(window->hide_titlebar_when_maximized && META_WINDOW_MAXIMIZED (window)) ||
|
||||
(window->hide_titlebar_when_maximized && META_WINDOW_TILED_SIDE_BY_SIDE (window)))
|
||||
else if (window->border_only)
|
||||
{
|
||||
/* override base frame type */
|
||||
return META_FRAME_TYPE_BORDER;
|
||||
|
@ -166,9 +166,6 @@ gboolean meta_prefs_get_workspaces_only_on_primary (void);
|
||||
int meta_prefs_get_draggable_border_width (void);
|
||||
int meta_prefs_get_drag_threshold (void);
|
||||
|
||||
gboolean meta_prefs_get_ignore_request_hide_titlebar (void);
|
||||
void meta_prefs_set_ignore_request_hide_titlebar (gboolean whether);
|
||||
|
||||
/**
|
||||
* MetaKeyBindingAction:
|
||||
* @META_KEYBINDING_ACTION_NONE: FILLME
|
||||
|
@ -54,7 +54,6 @@ item(WM_ICON_SIZE)
|
||||
item(_KWM_WIN_ICON)
|
||||
item(_MUTTER_HINTS)
|
||||
item(_GTK_THEME_VARIANT)
|
||||
item(_GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED)
|
||||
item(_GTK_APPLICATION_ID)
|
||||
item(_GTK_UNIQUE_BUS_NAME)
|
||||
item(_GTK_APPLICATION_OBJECT_PATH)
|
||||
|
@ -1710,35 +1710,6 @@ reload_gtk_theme_variant (MetaWindow *window,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
reload_gtk_hide_titlebar_when_maximized (MetaWindow *window,
|
||||
MetaPropValue *value,
|
||||
gboolean initial)
|
||||
{
|
||||
gboolean requested_value = FALSE;
|
||||
gboolean current_value = window->hide_titlebar_when_maximized;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
if (requested_value == current_value)
|
||||
return;
|
||||
|
||||
window->hide_titlebar_when_maximized = requested_value;
|
||||
|
||||
if (META_WINDOW_MAXIMIZED (window))
|
||||
{
|
||||
meta_window_queue (window, META_QUEUE_MOVE_RESIZE);
|
||||
meta_window_frame_size_changed (window);
|
||||
|
||||
if (window->frame)
|
||||
meta_frame_update_style (window->frame);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
reload_bypass_compositor (MetaWindow *window,
|
||||
MetaPropValue *value,
|
||||
@ -1854,7 +1825,6 @@ meta_x11_display_init_window_prop_hooks (MetaX11Display *x11_display)
|
||||
{ x11_display->atom__MOTIF_WM_HINTS, META_PROP_VALUE_MOTIF_HINTS, reload_mwm_hints, LOAD_INIT },
|
||||
{ XA_WM_TRANSIENT_FOR, META_PROP_VALUE_WINDOW, reload_transient_for, LOAD_INIT },
|
||||
{ x11_display->atom__GTK_THEME_VARIANT, META_PROP_VALUE_UTF8, reload_gtk_theme_variant, LOAD_INIT },
|
||||
{ x11_display->atom__GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED, META_PROP_VALUE_CARDINAL, reload_gtk_hide_titlebar_when_maximized, LOAD_INIT },
|
||||
{ x11_display->atom__GTK_APPLICATION_ID, META_PROP_VALUE_UTF8, reload_gtk_application_id, LOAD_INIT },
|
||||
{ x11_display->atom__GTK_UNIQUE_BUS_NAME, META_PROP_VALUE_UTF8, reload_gtk_unique_bus_name, LOAD_INIT },
|
||||
{ x11_display->atom__GTK_APPLICATION_OBJECT_PATH, META_PROP_VALUE_UTF8, reload_gtk_application_object_path, LOAD_INIT },
|
||||
|
@ -2205,7 +2205,6 @@ meta_window_move_resize_request (MetaWindow *window,
|
||||
* the monitor.
|
||||
*/
|
||||
if (meta_prefs_get_force_fullscreen() &&
|
||||
!window->hide_titlebar_when_maximized &&
|
||||
(window->decorated || !meta_window_is_client_decorated (window)) &&
|
||||
meta_rectangle_equal (&rect, &monitor_rect) &&
|
||||
window->has_fullscreen_func &&
|
||||
|
Loading…
Reference in New Issue
Block a user