xwayland: Call register_damage depending on ensure_surface_for_window
Preparation for next commit. This might change behaviour for non-InputOutput top-level windows. ensure_surface_for_window getting called and returning non-NULL for those would seem like a pre-existing bug though. Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1300>
This commit is contained in:
parent
a562d01a18
commit
07f6032627
|
@ -1360,18 +1360,14 @@ xwl_realize_window(WindowPtr window)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xwl_screen->rootless ?
|
|
||||||
(window->drawable.class == InputOutput &&
|
|
||||||
window->parent == window->drawable.pScreen->root) :
|
|
||||||
!window->parent) {
|
|
||||||
if (!register_damage(window))
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
xwl_window = ensure_surface_for_window(window);
|
xwl_window = ensure_surface_for_window(window);
|
||||||
if (!xwl_window)
|
if (!xwl_window)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
if (window == xwl_window->toplevel &&
|
||||||
|
!window_get_damage(window))
|
||||||
|
return register_damage(window);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue