summaryrefslogtreecommitdiff
path: root/xwayland
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-05-02 10:21:38 -0400
committerJason Ekstrand <jason.ekstrand@intel.com>2014-07-17 13:59:01 -0700
commitccf48fb4f9923e59e82911a2c03dda9bc70541a0 (patch)
tree74fd61fddacf0cc9d78929f267519a799ade7aa0 /xwayland
parentbd65e508753b8c1eeadcaa1c223bace2a3477083 (diff)
downloadweston-ccf48fb4f9923e59e82911a2c03dda9bc70541a0.tar.gz
shell: Replace set_margin with set_window_geometry
Currently, there is a fun flicker when toggling maximization or fullscreen on a window in mutter or more sophisicated compositors and WMs. What happens is that the client want so go maximized, so we calculate the size that we want the window to resize to (640x480), and then add on its margins to find the buffer size (+10 = 660x500), and then send out a configure event for that size. The client renders to that size, realizes that it's maximized, and then says "oh hey, my margins are actually 0 now!", and so the compositor has to send out another configure event. In order to fix this, make the the configure request correspond to the window geometry we'd like the window to be at. At the same time, replace set_margin with set_window_geometry, where we specify a rect rather than a border around the window.
Diffstat (limited to 'xwayland')
-rw-r--r--xwayland/window-manager.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
index 2fb65b1a..625a0e6b 100644
--- a/xwayland/window-manager.c
+++ b/xwayland/window-manager.c
@@ -1007,12 +1007,9 @@ weston_wm_window_draw_decoration(void *data)
pixman_region32_init_rect(&window->surface->pending.input,
input_x, input_y, input_w, input_h);
-
- shell_interface->set_margin(window->shsurf,
- input_x,
- width - input_w - input_x,
- input_y,
- height - input_h - input_y);
+
+ shell_interface->set_window_geometry(window->shsurf,
+ input_x, input_y, input_w, input_h);
}
}