[mutter/wip/fmuellner/show-titlebar-when-maximized] x11: Remove hide-titlebar-when-maximized support
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/fmuellner/show-titlebar-when-maximized] x11: Remove hide-titlebar-when-maximized support
- Date: Wed, 12 Sep 2018 11:55:45 +0000 (UTC)
commit 38b1fe765b5f0256bbd7e4ac098e16a35d9f55b9
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Sep 8 13:26:13 2018 +0200
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
src/core/prefs.c | 13 -------------
src/core/window-private.h | 1 -
src/core/window.c | 4 +---
src/meta/prefs.h | 3 ---
src/x11/atomnames.h | 1 -
src/x11/window-props.c | 30 ------------------------------
src/x11/window-x11.c | 1 -
7 files changed, 1 insertion(+), 52 deletions(-)
---
diff --git a/src/core/prefs.c b/src/core/prefs.c
index 30ac5d010..6dcd4a7a4 100644
--- a/src/core/prefs.c
+++ b/src/core/prefs.c
@@ -108,7 +108,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;
@@ -2083,15 +2082,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;
-}
diff --git a/src/core/window-private.h b/src/core/window-private.h
index c47de087a..d043bc84a 100644
--- a/src/core/window-private.h
+++ b/src/core/window-private.h
@@ -190,7 +190,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;
diff --git a/src/core/window.c b/src/core/window.c
index c06f52c86..03c4fcb4f 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -7698,9 +7698,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;
diff --git a/src/meta/prefs.h b/src/meta/prefs.h
index 1aff3a6ff..2d75c47a1 100644
--- a/src/meta/prefs.h
+++ b/src/meta/prefs.h
@@ -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
diff --git a/src/x11/atomnames.h b/src/x11/atomnames.h
index ed3c72a09..b61f47ff4 100644
--- a/src/x11/atomnames.h
+++ b/src/x11/atomnames.h
@@ -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)
diff --git a/src/x11/window-props.c b/src/x11/window-props.c
index d06a89a21..e1b075e42 100644
--- a/src/x11/window-props.c
+++ b/src/x11/window-props.c
@@ -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 },
diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c
index b2b2c9cb3..cba2efd7d 100644
--- a/src/x11/window-x11.c
+++ b/src/x11/window-x11.c
@@ -2133,7 +2133,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 &&
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]