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 3f53d9179b. 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>
dev
Pekka Paalanen 5 years ago committed by Daniel Stone
parent 2add217690
commit 83fb745ccf
  1. 11
      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;
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;

Loading…
Cancel
Save