Commit a843c614 authored by Roman Gilg's avatar Roman Gilg Committed by Adam Jackson
Browse files

xwayland: restrict present cleanup to presenting and top parent window

Clean up only if the request points to the presenting window or its top
parent window.

Since in this case all events are removed unconditionally, always stop
the timer.
Reviewed-by: Adam Jackson's avatarAdam Jackson <>
Signed-off-by: Roman Gilg's avatarRoman Gilg <>
parent 975d3a50
......@@ -77,13 +77,14 @@ xwl_present_cleanup(struct xwl_window *xwl_window, WindowPtr window)
struct xwl_present_event *event, *tmp;
if (xwl_window->present_window == window || xwl_window->window == window) {
if (xwl_window->present_window != window && xwl_window->window != window)
if (xwl_window->present_frame_callback) {
xwl_window->present_frame_callback = NULL;
xwl_window->present_window = NULL;
/* Clear remaining events */
xorg_list_for_each_entry_safe(event, tmp, &xwl_window->present_event_list, list) {
......@@ -98,7 +99,6 @@ xwl_present_cleanup(struct xwl_window *xwl_window, WindowPtr window)
/* Clear timer */
if (!xwl_present_has_events(xwl_window))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment