|
|
2c033f |
From 5d53aacdae7666887c5776888974db3973278a5e Mon Sep 17 00:00:00 2001
|
|
|
2c033f |
From: Rui Matos <tiagomatos@gmail.com>
|
|
|
2c033f |
Date: Wed, 29 Jul 2015 19:02:48 +0200
|
|
|
2c033f |
Subject: [PATCH] window: Remove fullscreen_after_placement special case
|
|
|
2c033f |
|
|
|
2c033f |
This was introduced in commit c6793d477a324f857d31d0704f84ed9de0f1d680
|
|
|
2c033f |
to prevent window self-maximisation. It turns out that that bug seems
|
|
|
2c033f |
to have been fixed meanwhile in a different way since the reproducer
|
|
|
2c033f |
in https://bugzilla.gnome.org/show_bug.cgi?id=461927#c37 now works
|
|
|
2c033f |
fine with this special handling removed.
|
|
|
2c033f |
|
|
|
2c033f |
In fact, failing to set window->fullscreen immediately when loading
|
|
|
2c033f |
the initial set of X properties causes us to create a UI frame for a
|
|
|
2c033f |
window that sets _NET_WM_STATE_FULLSCREEN.
|
|
|
2c033f |
|
|
|
2c033f |
This, in turn, might cause the fullscreen constrain code to fail if
|
|
|
2c033f |
the window also sets min_width/min_height size hints to be the monitor
|
|
|
2c033f |
size since the UI frame size added to those makes the rectangle too
|
|
|
2c033f |
big to fit the monitor. If the window doesn't set these hints, we
|
|
|
2c033f |
fullscreen it but the window will get sized such that the UI frame is
|
|
|
2c033f |
taken into account while it really shouldn't (see the reproducer
|
|
|
2c033f |
above).
|
|
|
2c033f |
|
|
|
2c033f |
https://bugzilla.gnome.org/show_bug.cgi?id=753020
|
|
|
2c033f |
---
|
|
|
2c033f |
src/core/constraints.c | 16 +++-------------
|
|
|
2c033f |
src/core/window-private.h | 3 ---
|
|
|
2c033f |
src/core/window.c | 1 -
|
|
|
2c033f |
src/x11/window-props.c | 5 ++++-
|
|
|
2c033f |
4 files changed, 7 insertions(+), 18 deletions(-)
|
|
|
2c033f |
|
|
|
2c033f |
diff --git a/src/core/constraints.c b/src/core/constraints.c
|
|
|
2c033f |
index 1cff417..46e524f 100644
|
|
|
2c033f |
--- a/src/core/constraints.c
|
|
|
2c033f |
+++ b/src/core/constraints.c
|
|
|
2c033f |
@@ -508,11 +508,10 @@ place_window_if_needed(MetaWindow *window,
|
|
|
2c033f |
if (window->placed || did_placement)
|
|
|
2c033f |
{
|
|
|
2c033f |
if (window->maximize_horizontally_after_placement ||
|
|
|
2c033f |
- window->maximize_vertically_after_placement ||
|
|
|
2c033f |
- window->fullscreen_after_placement)
|
|
|
2c033f |
+ window->maximize_vertically_after_placement)
|
|
|
2c033f |
{
|
|
|
2c033f |
- /* define a sane saved_rect so that the user can unmaximize or
|
|
|
2c033f |
- * make unfullscreen to something reasonable.
|
|
|
2c033f |
+ /* define a sane saved_rect so that the user can unmaximize to
|
|
|
2c033f |
+ * something reasonable.
|
|
|
2c033f |
*/
|
|
|
2c033f |
if (info->current.width >= info->work_area_monitor.width)
|
|
|
2c033f |
{
|
|
|
2c033f |
@@ -540,15 +539,6 @@ place_window_if_needed(MetaWindow *window,
|
|
|
2c033f |
(window->maximize_vertically_after_placement ?
|
|
|
2c033f |
META_MAXIMIZE_VERTICAL : 0), &info->current);
|
|
|
2c033f |
|
|
|
2c033f |
- if (window->fullscreen_after_placement)
|
|
|
2c033f |
- {
|
|
|
2c033f |
- window->saved_rect = info->current;
|
|
|
2c033f |
- window->fullscreen = TRUE;
|
|
|
2c033f |
- window->fullscreen_after_placement = FALSE;
|
|
|
2c033f |
-
|
|
|
2c033f |
- g_object_notify (G_OBJECT (window), "fullscreen");
|
|
|
2c033f |
- }
|
|
|
2c033f |
-
|
|
|
2c033f |
window->maximize_horizontally_after_placement = FALSE;
|
|
|
2c033f |
window->maximize_vertically_after_placement = FALSE;
|
|
|
2c033f |
}
|
|
|
2c033f |
diff --git a/src/core/window-private.h b/src/core/window-private.h
|
|
|
2c033f |
index 713acd3..9f98739 100644
|
|
|
2c033f |
--- a/src/core/window-private.h
|
|
|
2c033f |
+++ b/src/core/window-private.h
|
|
|
2c033f |
@@ -174,9 +174,6 @@ struct _MetaWindow
|
|
|
2c033f |
/* Whether the window is marked as urgent */
|
|
|
2c033f |
guint urgent : 1;
|
|
|
2c033f |
|
|
|
2c033f |
- /* Whether we have to fullscreen after placement */
|
|
|
2c033f |
- guint fullscreen_after_placement : 1;
|
|
|
2c033f |
-
|
|
|
2c033f |
/* Area to cover when in fullscreen mode. If _NET_WM_FULLSCREEN_MONITORS has
|
|
|
2c033f |
* been overridden (via a client message), the window will cover the union of
|
|
|
2c033f |
* these monitors. If not, this is the single monitor which the window's
|
|
|
2c033f |
diff --git a/src/core/window.c b/src/core/window.c
|
|
|
2c033f |
index 2e82741..9e2ebf5 100644
|
|
|
2c033f |
--- a/src/core/window.c
|
|
|
2c033f |
+++ b/src/core/window.c
|
|
|
2c033f |
@@ -860,7 +860,6 @@ _meta_window_shared_new (MetaDisplay *display,
|
|
|
2c033f |
window->maximize_vertically_after_placement = FALSE;
|
|
|
2c033f |
window->minimize_after_placement = FALSE;
|
|
|
2c033f |
window->fullscreen = FALSE;
|
|
|
2c033f |
- window->fullscreen_after_placement = FALSE;
|
|
|
2c033f |
window->fullscreen_monitors[0] = -1;
|
|
|
2c033f |
window->require_fully_onscreen = TRUE;
|
|
|
2c033f |
window->require_on_single_monitor = TRUE;
|
|
|
2c033f |
diff --git a/src/x11/window-props.c b/src/x11/window-props.c
|
|
|
2c033f |
index 3164985..0851f22 100644
|
|
|
2c033f |
--- a/src/x11/window-props.c
|
|
|
2c033f |
+++ b/src/x11/window-props.c
|
|
|
2c033f |
@@ -819,7 +819,10 @@ reload_net_wm_state (MetaWindow *window,
|
|
|
2c033f |
else if (value->v.atom_list.atoms[i] == window->display->atom__NET_WM_STATE_SKIP_PAGER)
|
|
|
2c033f |
priv->wm_state_skip_pager = TRUE;
|
|
|
2c033f |
else if (value->v.atom_list.atoms[i] == window->display->atom__NET_WM_STATE_FULLSCREEN)
|
|
|
2c033f |
- window->fullscreen_after_placement = TRUE;
|
|
|
2c033f |
+ {
|
|
|
2c033f |
+ window->fullscreen = TRUE;
|
|
|
2c033f |
+ g_object_notify (G_OBJECT (window), "fullscreen");
|
|
|
2c033f |
+ }
|
|
|
2c033f |
else if (value->v.atom_list.atoms[i] == window->display->atom__NET_WM_STATE_ABOVE)
|
|
|
2c033f |
window->wm_state_above = TRUE;
|
|
|
2c033f |
else if (value->v.atom_list.atoms[i] == window->display->atom__NET_WM_STATE_BELOW)
|
|
|
2c033f |
--
|
|
|
2c033f |
2.4.3
|
|
|
2c033f |
|