summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2017-04-02 22:31:27 +0300
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2017-04-02 22:31:27 +0300
commit7ff5ff1fb64e3fc7c183be768228f11eb0f15bb9 (patch)
treea722e77b3258b81918abe57d73d1d9614603b3b9
parentfa3ae8ef2bca601e6fdc0c2e4edd3265b0aca665 (diff)
downloadmetacity-7ff5ff1fb64e3fc7c183be768228f11eb0f15bb9.tar.gz
revert "prevent window self-maximisation"
This reverts commit 4943d79d6844af3f7fc0a15ceadb69d95c4c5c61. https://bugzilla.gnome.org/show_bug.cgi?id=461927 This bug had two testcases that now seems to work fine. https://bugzilla.gnome.org/show_bug.cgi?id=760510
-rw-r--r--src/core/constraints.c14
-rw-r--r--src/core/window-private.h6
-rw-r--r--src/core/window-props.c2
-rw-r--r--src/core/window.c15
4 files changed, 5 insertions, 32 deletions
diff --git a/src/core/constraints.c b/src/core/constraints.c
index 48289117..45902218 100644
--- a/src/core/constraints.c
+++ b/src/core/constraints.c
@@ -570,11 +570,10 @@ place_window_if_needed(MetaWindow *window,
if (window->placed || did_placement)
{
if (window->maximize_horizontally_after_placement ||
- window->maximize_vertically_after_placement ||
- window->fullscreen_after_placement)
+ window->maximize_vertically_after_placement)
{
- /* define a sane saved_rect so that the user can unmaximize or
- * make unfullscreen to something reasonable.
+ /* define a sane saved_rect so that the user can unmaximize to
+ * something reasonable.
*/
if (info->current.width >= info->work_area_xinerama.width)
{
@@ -601,13 +600,6 @@ place_window_if_needed(MetaWindow *window,
if (window->frame && !window->fullscreen)
meta_frame_calc_borders (window->frame, info->borders);
- if (window->fullscreen_after_placement)
- {
- window->saved_rect = info->current;
- window->fullscreen = TRUE;
- window->fullscreen_after_placement = FALSE;
- }
-
window->maximize_horizontally_after_placement = FALSE;
window->maximize_vertically_after_placement = FALSE;
}
diff --git a/src/core/window-private.h b/src/core/window-private.h
index 7a88988b..6def73a0 100644
--- a/src/core/window-private.h
+++ b/src/core/window-private.h
@@ -166,9 +166,6 @@ struct _MetaWindow
/* Whether we're fullscreen */
guint fullscreen : 1;
- /* Whether we have to fullscreen after placement */
- guint fullscreen_after_placement : 1;
-
/* Area to cover when in fullscreen mode. If _NET_WM_FULLSCREEN_MONITORS has
* been overridden (via a client message), the window will cover the union of
* these monitors. If not, this is the single monitor which the window's
@@ -283,9 +280,6 @@ struct _MetaWindow
/* Have we placed this window? */
guint placed : 1;
- /* Must we force_save_user_window_placement? */
- guint force_save_user_rect : 1;
-
/* Is this not a transient of the focus window which is being denied focus? */
guint denied_focus_and_not_transient : 1;
diff --git a/src/core/window-props.c b/src/core/window-props.c
index 4407d311..f48035fd 100644
--- a/src/core/window-props.c
+++ b/src/core/window-props.c
@@ -843,7 +843,7 @@ reload_net_wm_state (MetaWindow *window,
else if (value->v.atom_list.atoms[i] == window->display->atom__NET_WM_STATE_SKIP_PAGER)
window->wm_state_skip_pager = TRUE;
else if (value->v.atom_list.atoms[i] == window->display->atom__NET_WM_STATE_FULLSCREEN)
- window->fullscreen_after_placement = TRUE;
+ window->fullscreen = TRUE;
else if (value->v.atom_list.atoms[i] == window->display->atom__NET_WM_STATE_ABOVE)
window->wm_state_above = TRUE;
else if (value->v.atom_list.atoms[i] == window->display->atom__NET_WM_STATE_BELOW)
diff --git a/src/core/window.c b/src/core/window.c
index 398e14de..bab13c2d 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -466,7 +466,6 @@ meta_window_new (MetaDisplay *display,
window->maximize_horizontally_after_placement = FALSE;
window->maximize_vertically_after_placement = FALSE;
window->minimize_after_placement = FALSE;
- window->fullscreen_after_placement = FALSE;
window->fullscreen_monitors[0] = -1;
window->require_fully_onscreen = TRUE;
window->require_on_single_xinerama = TRUE;
@@ -493,7 +492,6 @@ meta_window_new (MetaDisplay *display,
meta_topic (META_DEBUG_PLACEMENT,
"Not placing window 0x%lx since it's already mapped\n",
xwindow);
- window->force_save_user_rect = TRUE;
window->denied_focus_and_not_transient = FALSE;
window->unmanaging = FALSE;
window->is_in_queues = 0;
@@ -2669,8 +2667,6 @@ meta_window_maximize_internal (MetaWindow *window,
window->maximized_horizontally || maximize_horizontally;
window->maximized_vertically =
window->maximized_vertically || maximize_vertically;
- if (maximize_horizontally || maximize_vertically)
- window->force_save_user_rect = FALSE;
/* Fix for #336850: If the frame shape isn't reapplied, it is
* possible that the frame will retains its rounded corners. That
@@ -2903,10 +2899,6 @@ meta_window_unmaximize (MetaWindow *window,
target_rect.width,
target_rect.height);
- /* Make sure user_rect is current.
- */
- force_save_user_window_placement (window);
-
/* When we unmaximize, if we're doing a mouse move also we could
* get the window suddenly jumping to the upper left corner of
* the workspace, since that's where it was when the grab op
@@ -2979,7 +2971,6 @@ meta_window_make_fullscreen_internal (MetaWindow *window)
meta_window_save_rect (window);
window->fullscreen = TRUE;
- window->force_save_user_rect = FALSE;
meta_stack_freeze (window->screen->stack);
meta_window_update_layer (window);
@@ -3040,10 +3031,6 @@ meta_window_unmake_fullscreen (MetaWindow *window)
target_rect.width,
target_rect.height);
- /* Make sure user_rect is current.
- */
- force_save_user_window_placement (window);
-
meta_window_update_layer (window);
}
}
@@ -3918,7 +3905,7 @@ meta_window_move_resize_internal (MetaWindow *window,
if (need_configure_notify && configure_notify)
send_configure_notify (window);
- if (!window->placed && window->force_save_user_rect && !window->fullscreen)
+ if (!window->placed)
force_save_user_window_placement (window);
else if (is_user_action)
save_user_window_placement (window);