xwm: WM_TRANSIENT_FOR should not point to override-redirect window

The override-redirect window will not be assigned a shell_surface
object. If it is used as a parent window, it will cause a crash
when calling the set_parent function.

The EWMH specification does not describe the behavior of an
override-redirect window as a parent window, so we should ignore
this case.

Signed-off-by: Liu, Kai1 <kai1.liu@intel.com>
(cherry picked from commit b468687dd2663240d1613bf4a917f049ef09af46)
dev
Liu, Kai1 1 year ago committed by Marius Vlad
parent a5d52075a0
commit 38eb0a96e0
  1. 4
      xwayland/window-manager.c

@ -3048,7 +3048,9 @@ xserver_map_shell_surface(struct weston_wm_window *window,
} else if (window->override_redirect) {
xwayland_interface->set_xwayland(window->shsurf,
window->x, window->y);
} else if (window->transient_for && window->transient_for->surface) {
} else if (window->transient_for &&
!window->transient_for->override_redirect &&
window->transient_for->surface) {
parent = window->transient_for;
if (weston_wm_window_type_inactive(window)) {
xwayland_interface->set_transient(window->shsurf,

Loading…
Cancel
Save