From: Mikko Rasa Date: Sun, 13 Dec 2015 16:52:19 +0000 (+0200) Subject: Synchronize after subtracting damage from windows X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=bd63e587efd93c11a386a5fbebe21ea5adbbc4cb;p=geometrycompositor.git Synchronize after subtracting damage from windows The change in 19993ce wasn't enough to completely avoid the race condition, most likely because of direct rendering. --- diff --git a/source/main.c b/source/main.c index bfb01a4..185c6b4 100644 --- a/source/main.c +++ b/source/main.c @@ -1195,6 +1195,11 @@ void refresh_screen(Compositor *compositor, CompositedScreen *screen) unsigned i; int use_mask; + for(i=0; inwindows; ++i) + if(screen->windows[i].map_state==IsViewable) + XDamageSubtract(compositor->display, screen->windows[i].damage, None, None); + glXWaitX(); + use_gl(compositor, screen); glBindFramebuffer(GL_DRAW_FRAMEBUFFER, screen->framebuffer); @@ -1225,8 +1230,6 @@ void refresh_screen(Compositor *compositor, CompositedScreen *screen) glActiveTexture(GL_TEXTURE0); } - XDamageSubtract(compositor->display, window->damage, None, None); - if(window->recreate_pixmap) create_window_pixmap(compositor, screen, window); if(window->recreate_mask)