diff options
author | infirit <[email protected]> | 2014-10-24 12:52:46 +0200 |
---|---|---|
committer | infirit <[email protected]> | 2014-10-24 15:40:43 +0200 |
commit | 13741f524e5f8b780a96872f534237186fa78741 (patch) | |
tree | 52e6a4e0199b33b43c9bf77f81a97edb216e2738 /src/core | |
parent | bcbc109d2801e2c8898ebb558febe99945358d53 (diff) | |
download | marco-13741f524e5f8b780a96872f534237186fa78741.tar.bz2 marco-13741f524e5f8b780a96872f534237186fa78741.tar.xz |
Fix identification of CSD windows when checking whether to force fullscreen
We try to exempt CSD windows from being forced fullscreen if they are
undecorated and the size of the screen; however, we also catch almost
all windows that *do* need to be forced fullscreen in this check, since
they also have decorations turned off.
Identify actual CSD windows by checking whether _GTK_FRAME_EXTENTS is set -
GTK+ will always set this on CSD windows even if they have no invisible
borders or shadows at the current time.
Based on metacity commit: 41dd72bc5dd08d7d0cb136f694a6d9a30e38b341
From: Owen W. Taylor <[email protected]>
Metacity gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=723029
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/constraints.c | 2 | ||||
-rw-r--r-- | src/core/window-private.h | 2 | ||||
-rw-r--r-- | src/core/window.c | 18 |
3 files changed, 21 insertions, 1 deletions
diff --git a/src/core/constraints.c b/src/core/constraints.c index 4ac73ac5..68cf5ae1 100644 --- a/src/core/constraints.c +++ b/src/core/constraints.c @@ -437,7 +437,7 @@ setup_constraint_info (ConstraintInfo *info, */ if (meta_prefs_get_force_fullscreen() && - window->decorated && + (window->decorated || !meta_window_is_client_decorated (window)) && meta_rectangle_equal (new, &xinerama_info->rect) && window->has_fullscreen_func && !window->fullscreen) diff --git a/src/core/window-private.h b/src/core/window-private.h index e81fd7ac..882c8901 100644 --- a/src/core/window-private.h +++ b/src/core/window-private.h @@ -658,6 +658,8 @@ void meta_window_unset_demands_attention (MetaWindow *window); void meta_window_update_icon_now (MetaWindow *window); +gboolean meta_window_is_client_decorated (MetaWindow *window); + void meta_window_update_role (MetaWindow *window); void meta_window_update_net_wm_type (MetaWindow *window); diff --git a/src/core/window.c b/src/core/window.c index 75923e29..e7e0fb9e 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -8367,3 +8367,21 @@ meta_window_get_xwindow (MetaWindow *window) { return window->xwindow; } + +/** + * meta_window_is_client_decorated: + * + * Check if if the window has decorations drawn by the client. + * (window->decorated refers only to whether we should add decorations) + */ +gboolean +meta_window_is_client_decorated (MetaWindow *window) +{ + /* Currently the implementation here is hackish - + * has_custom_frame_extents() is set if _GTK_FRAME_EXTENTS is set + * to any value even 0. GTK+ always sets _GTK_FRAME_EXTENTS for + * client-side-decorated window, even if the value is 0 because + * the window is maxized and has no invisible borders or shadows. + */ + return window->has_custom_frame_extents; +} |