diff --git a/client/displayservers/Wayland/gl.c b/client/displayservers/Wayland/gl.c index d600163c..32510c80 100644 --- a/client/displayservers/Wayland/gl.c +++ b/client/displayservers/Wayland/gl.c @@ -123,7 +123,7 @@ void waylandEGLSwapBuffers(EGLDisplay display, EGLSurface surface, const struct app_handleResizeEvent(wlWm.width, wlWm.height, wl_fixed_to_double(wlWm.scale), (struct Border) {0, 0, 0, 0}); - app_invalidateWindow(); + app_invalidateWindow(true); waylandStopWaitFrame(); wlWm.needsResize = false; } diff --git a/client/displayservers/Wayland/shell_xdg.c b/client/displayservers/Wayland/shell_xdg.c index a6ac1293..17631c5d 100644 --- a/client/displayservers/Wayland/shell_xdg.c +++ b/client/displayservers/Wayland/shell_xdg.c @@ -46,7 +46,7 @@ static void xdgSurfaceConfigure(void * data, struct xdg_surface * xdgSurface, { wlWm.needsResize = true; wlWm.resizeSerial = serial; - app_invalidateWindow(); + app_invalidateWindow(true); waylandStopWaitFrame(); } else diff --git a/client/displayservers/Wayland/window.c b/client/displayservers/Wayland/window.c index de9ee036..85720cfd 100644 --- a/client/displayservers/Wayland/window.c +++ b/client/displayservers/Wayland/window.c @@ -48,7 +48,7 @@ void waylandWindowUpdateScale(void) wlWm.scale = maxScale; wlWm.fractionalScale = wl_fixed_from_int(wl_fixed_to_int(maxScale)) != maxScale; wlWm.needsResize = true; - app_invalidateWindow(); + app_invalidateWindow(true); waylandStopWaitFrame(); } } diff --git a/client/displayservers/X11/x11.c b/client/displayservers/X11/x11.c index 08201b8b..23d09ef0 100644 --- a/client/displayservers/X11/x11.c +++ b/client/displayservers/X11/x11.c @@ -708,7 +708,7 @@ static int x11EventThread(void * unused) case Expose: { - app_invalidateWindow(); + app_invalidateWindow(true); break; } diff --git a/client/include/app.h b/client/include/app.h index 9abd58d2..f994339f 100644 --- a/client/include/app.h +++ b/client/include/app.h @@ -46,7 +46,7 @@ bool app_isFormatValid(void); void app_updateCursorPos(double x, double y); void app_updateWindowPos(int x, int y); void app_handleResizeEvent(int w, int h, double scale, const struct Border border); -void app_invalidateWindow(void); +void app_invalidateWindow(bool full); void app_handleMouseRelative(double normx, double normy, double rawx, double rawy); diff --git a/client/src/app.c b/client/src/app.c index 292b89d4..385f89bf 100644 --- a/client/src/app.c +++ b/client/src/app.c @@ -495,9 +495,10 @@ void app_handleResizeEvent(int w, int h, double scale, const struct Border borde } } -void app_invalidateWindow(void) +void app_invalidateWindow(bool full) { - atomic_store(&g_state.invalidateWindow, true); + if (full) + atomic_store(&g_state.invalidateWindow, true); lgSignalEvent(g_state.frameEvent); } @@ -537,7 +538,7 @@ void app_handleRenderEvent(const uint64_t timeUs) } if (invalidate) - app_invalidateWindow(); + app_invalidateWindow(false); } void app_setFullscreen(bool fs) @@ -616,7 +617,7 @@ void app_alert(LG_MsgAlert type, const char * fmt, ...) g_state.alertTimeout = microtime() + ALERT_TIMEOUT; g_state.alertType = type; g_state.alertShow = true; - app_invalidateWindow(); + app_invalidateWindow(false); } KeybindHandle app_registerKeybind(int sc, KeybindFn callback, void * opaque, const char * description) @@ -875,7 +876,7 @@ void app_setOverlay(bool enable) g_state.io->ConfigFlags |= ImGuiConfigFlags_NoMouse; core_resetOverlayInputState(); core_setGrabQuiet(wasGrabbed); - app_invalidateWindow(); + app_invalidateWindow(false); } } diff --git a/client/src/overlay/fps.c b/client/src/overlay/fps.c index 54fced2a..86b05b12 100644 --- a/client/src/overlay/fps.c +++ b/client/src/overlay/fps.c @@ -31,7 +31,7 @@ static bool showFPS; static void showFPSKeybind(int sc, void * opaque) { showFPS ^= true; - app_invalidateWindow(); + app_invalidateWindow(false); } static void fps_earlyInit(void) diff --git a/client/src/overlay/graphs.c b/client/src/overlay/graphs.c index 469b38a5..3df640e0 100644 --- a/client/src/overlay/graphs.c +++ b/client/src/overlay/graphs.c @@ -65,7 +65,7 @@ static void configCallback(void * udata) static void showTimingKeybind(int sc, void * opaque) { gs.show ^= true; - app_invalidateWindow(); + app_invalidateWindow(false); } static bool graphs_init(void ** udata, const void * params)