summaryrefslogtreecommitdiff
path: root/src/wayland
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-05-01 18:55:34 -0400
committerJasper St. Pierre <jstpierre@mecheye.net>2014-05-01 18:59:17 -0400
commit57bb297450b491f1db364355dcbaf1f89d966b32 (patch)
tree90789b586a6c57852cda16e9314f5211764156c3 /src/wayland
parent06ca99c3a353ec13e221b4bec1103ec56f2609d4 (diff)
downloadmutter-57bb297450b491f1db364355dcbaf1f89d966b32.tar.gz
window-wayland: Fix interactive resizing from the top/left once more
Ugh. So in the fullscreen case, we need to make sure to specify that it's a MOVE_ACTION so that we move to the saved position, but we can't do that in the resizing case since we need to use the resized rectangle. The flags are really hurting us here. Perhaps we should make it the client's responsibility to specify a complete rectangle which we could resize to; then the weird-o logic would be self-contained in each front-end. I'm not convinced this covers all cases, especially when we could have a dangling weird state pointer, but it fixes our existing two testcases.
Diffstat (limited to 'src/wayland')
-rw-r--r--src/wayland/window-wayland.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/wayland/window-wayland.c b/src/wayland/window-wayland.c
index 80ea30ec3..0e6e9b719 100644
--- a/src/wayland/window-wayland.c
+++ b/src/wayland/window-wayland.c
@@ -222,21 +222,21 @@ meta_window_wayland_move_resize (MetaWindow *window,
flags = META_IS_WAYLAND_RESIZE;
- if (wl_window->has_saved_pos)
- {
- x = wl_window->saved_x;
- y = wl_window->saved_y;
- wl_window->has_saved_pos = FALSE;
- flags |= META_IS_MOVE_ACTION;
- }
- else
- {
- meta_window_get_position (window, &x, &y);
- }
-
- /* dx/dy are ignored during resizing */
+ /* x/y are ignored when we're doing interactive resizing */
if (!meta_grab_op_is_resizing (window->display->grab_op))
{
+ if (wl_window->has_saved_pos)
+ {
+ x = wl_window->saved_x;
+ y = wl_window->saved_y;
+ wl_window->has_saved_pos = FALSE;
+ flags |= META_IS_MOVE_ACTION;
+ }
+ else
+ {
+ meta_window_get_position (window, &x, &y);
+ }
+
if (dx != 0 || dy != 0)
{
x += dx;