summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2017-06-21 11:30:09 +0200
committerOlivier Fourdan <ofourdan@redhat.com>2018-01-11 11:03:04 +0100
commit1139ace244b94e7007c7354d8872ddf694c9b29d (patch)
treeeb42bf2cc9f39778b77c218883cc7449534d45a4
parentbd9a3008014d1063aac75241ff750798cbe5aaee (diff)
downloadmutter-1139ace244b94e7007c7354d8872ddf694c9b29d.tar.gz
core: Add new unmaximize flag
Wayland clients know their size better, so for Wayland we'd rather not try to resize the client on un-maximize, but for this to work we need a new MetaMoveResizeFlags. https://bugzilla.gnome.org/show_bug.cgi?id=783901
-rw-r--r--src/core/window-private.h11
-rw-r--r--src/core/window.c3
2 files changed, 8 insertions, 6 deletions
diff --git a/src/core/window-private.h b/src/core/window-private.h
index 196e8af84..05c309eb0 100644
--- a/src/core/window-private.h
+++ b/src/core/window-private.h
@@ -74,11 +74,12 @@ typedef enum {
typedef enum
{
META_MOVE_RESIZE_CONFIGURE_REQUEST = 1 << 0,
- META_MOVE_RESIZE_USER_ACTION = 1 << 1,
- META_MOVE_RESIZE_MOVE_ACTION = 1 << 2,
- META_MOVE_RESIZE_RESIZE_ACTION = 1 << 3,
- META_MOVE_RESIZE_WAYLAND_RESIZE = 1 << 4,
- META_MOVE_RESIZE_STATE_CHANGED = 1 << 5,
+ META_MOVE_RESIZE_USER_ACTION = 1 << 1,
+ META_MOVE_RESIZE_MOVE_ACTION = 1 << 2,
+ META_MOVE_RESIZE_RESIZE_ACTION = 1 << 3,
+ META_MOVE_RESIZE_WAYLAND_RESIZE = 1 << 4,
+ META_MOVE_RESIZE_STATE_CHANGED = 1 << 5,
+ META_MOVE_RESIZE_UNMAXIMIZE = 1 << 6,
} MetaMoveResizeFlags;
typedef enum
diff --git a/src/core/window.c b/src/core/window.c
index f664ef7c3..673887fa7 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -3317,7 +3317,8 @@ meta_window_unmaximize (MetaWindow *window,
meta_window_move_resize_internal (window,
(META_MOVE_RESIZE_MOVE_ACTION |
META_MOVE_RESIZE_RESIZE_ACTION |
- META_MOVE_RESIZE_STATE_CHANGED),
+ META_MOVE_RESIZE_STATE_CHANGED |
+ META_MOVE_RESIZE_UNMAXIMIZE),
NorthWestGravity,
target_rect);