xwm: fix initially-fullscreen windows

It looks like commit ad0da4596d introduced a bug
for X11 windows that are initially fullscreen by adding code to the end of
xserver_map_shell_surface() while ignoring the 'return' that this patch
removes. That may have caused some annoying window state issues, but the
problem became more pronounced with 7ace831ca6
when used with an Xwayland version that honours _XWAYLAND_ALLOW_COMMITS.

In the latter case, there is a possiblity the window will never show up, as XWM
forgets to set allow_commits=true. However, the window may sometimes actually
show up due to an oversight in Xwayland: the Present code may be flipping the
window buffers and not checking _XWAYLAND_ALLOW_COMMITS if it is supposed
commit at all.

Since then, f568968f8a added more places where
allow_commits is set to true, masking the window-does-not-show-up issue. Window
pending state likely still remained an issue.

This patch properly fixes the "window never appears" issue by making sure
allow_commit=true is set. At the same time, it ensures the pending state
functions are called at the end of xserver_map_shell_surface(), which may fix
some window state issues like misplaced decorations and/or position of
initially-fullscreen windows. Unfortunately, it certainly does not fix all such
state problems.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
dev
Pekka Paalanen 5 years ago committed by Daniel Stone
parent bdd45d6262
commit 134e14969f
  1. 1
      xwayland/window-manager.c

@ -2925,7 +2925,6 @@ xserver_map_shell_surface(struct weston_wm_window *window,
window->saved_height = window->height;
xwayland_interface->set_fullscreen(window->shsurf,
window->legacy_fullscreen_output.output);
return;
} else if (window->override_redirect) {
xwayland_interface->set_xwayland(window->shsurf,
window->x, window->y);

Loading…
Cancel
Save