diff --git a/client/displayservers/X11/x11.c b/client/displayservers/X11/x11.c index 0b7c25f9..60f5f434 100644 --- a/client/displayservers/X11/x11.c +++ b/client/displayservers/X11/x11.c @@ -643,6 +643,13 @@ static int x11EventThread(void * unused) while(app_isRunning()) { + const uint64_t lastWMEvent = atomic_load(&x11.lastWMEvent); + if (x11.invalidateAll && microtime() - lastWMEvent > 100000UL) + { + x11.invalidateAll = false; + app_invalidateWindow(true); + } + if (!XPending(x11.display)) { FD_ZERO(&in_fds); @@ -710,7 +717,7 @@ static int x11EventThread(void * unused) case Expose: { atomic_store(&x11.lastWMEvent, microtime()); - app_invalidateWindow(false); + x11.invalidateAll = true; break; } diff --git a/client/displayservers/X11/x11.h b/client/displayservers/X11/x11.h index 820259c6..96596b3e 100644 --- a/client/displayservers/X11/x11.h +++ b/client/displayservers/X11/x11.h @@ -41,6 +41,7 @@ struct X11DSState XVisualInfo * visual; _Atomic(uint64_t) lastWMEvent; + bool invalidateAll; int xpresentOp; bool jitRender;