summaryrefslogtreecommitdiff
path: root/xwayland
diff options
context:
space:
mode:
authorPekka Paalanen <pekka.paalanen@collabora.com>2019-12-09 13:03:02 +0200
committerDaniel Stone <daniel@fooishbar.org>2020-01-29 11:31:11 +0000
commit83fb745ccf454fdd312515bc9cf969f1315a765a (patch)
treeb42a6924daed85c98c021aebc25c6da0453da1f2 /xwayland
parent2add217690e12e69478d5222fa81857b3337667b (diff)
downloadweston-83fb745ccf454fdd312515bc9cf969f1315a765a.tar.gz
xwm: always configure on send_configure()
There is more state than just the application window width and height that affects whether calling weston_wm_window_configure() is necessary: everything that affects the frame window, fullscreen state in particular. Therefore do not skip the call by just width and height. If send_configure() happens to be called "unnecessarily", this will now forward some of those calls to the X11 clients. However, since it uses an idle task, it should not result in a flood at least. And if send_configure() is spammed, maybe that should then be fixed in its callers. This patch should fix the misplacement of a fullscreen X11 window due to the frame window being incorrectly sized and positioned, and the app window incorrectly positioned inside the frame window. The fullscreen window problems were observed in a case where the window does not hit legacy_fullscreen() but first maps and then sets _NET_WM_STATE_FULLSCREEN. Additionally the initial window size must match the output size where it gets fullscreened. In that case the frame window was left as if not fullscreened. This practically reverts 3f53d9179bcdb11d053527336ac4a49f274bc8d1. I'm not sure what problem that patch was fixing, but I couldn't make any resizing freeze. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Diffstat (limited to 'xwayland')
-rw-r--r--xwayland/window-manager.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
index 666e8e80..747bf363 100644
--- a/xwayland/window-manager.c
+++ b/xwayland/window-manager.c
@@ -2756,14 +2756,15 @@ send_configure(struct weston_surface *surface, int32_t width, int32_t height)
else
new_height = 1;
- if (window->width == new_width && window->height == new_height)
- return;
-
- window->width = new_width;
- window->height = new_height;
+ if (window->width != new_width || window->height != new_height) {
+ window->width = new_width;
+ window->height = new_height;
- if (window->frame)
- frame_resize_inside(window->frame, window->width, window->height);
+ if (window->frame) {
+ frame_resize_inside(window->frame,
+ window->width, window->height);
+ }
+ }
if (window->configure_source)
return;