Commit cb06a039 authored by Olivier Fourdan's avatar Olivier Fourdan 🛠
Browse files

compositor: Do not clear timeout on retry

When using vblank (either GLX or Xpresent), a previous paint request may
still be pending while new damage notifications are triggered by clients

If that occurs, xfwm4 does not cancel the existing timeout previously
created timeout (so it will retry automatically) but clears the timeout

As a result, if new damage occurs, a new timeout would be created while
an existing one is still running.

When using Xpresent while the screen is turned off, no Xpresent event
notification occur, which increases the risk of the above occuring.

Clear the timeout id only when the repaint succeeded, so we don't pile
up multiple retries.
Signed-off-by: Olivier Fourdan's avatarOlivier Fourdan <>
See-also: #502
parent 88c735c9
Pipeline #6193 passed with stages
in 3 minutes and 10 seconds
......@@ -2741,10 +2741,17 @@ static gboolean
compositor_timeout_cb (gpointer data)
ScreenInfo *screen_info;
gboolean retry;
screen_info = (ScreenInfo *) data;
screen_info->compositor_timeout_id = 0;
return repair_screen (screen_info);
retry = repair_screen (screen_info);
if (retry == FALSE)
screen_info->compositor_timeout_id = 0;
return retry;
static void
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