From b3b71d6f02b0e0ce5d8100d756c6d32fb3a533f9 Mon Sep 17 00:00:00 2001 From: Quantum Date: Sun, 1 Aug 2021 01:47:59 -0400 Subject: [PATCH] [client] egl: fix cursor handling when invalidating If we invalidate the window, we used to not update this->cursorLast, and this causes us to lose track of the cursor. Now we update this->cursorLast unconditionally, and this fixes the issue. --- client/renderers/EGL/egl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/renderers/EGL/egl.c b/client/renderers/EGL/egl.c index 128120e3..f7db5b4a 100644 --- a/client/renderers/EGL/egl.c +++ b/client/renderers/EGL/egl.c @@ -960,8 +960,6 @@ static bool egl_render(void * opaque, LG_RendererRotate rotate, const bool newFr if (cursorState.visible) damage[damageIdx++] = cursorState.rect; - this->cursorLast = cursorState; - if (desktopDamage->count == -1) // -1 damage count means invalidating entire window. damageIdx = 0; @@ -987,6 +985,7 @@ static bool egl_render(void * opaque, LG_RendererRotate rotate, const bool newFr damageIdx = 0; this->hadOverlay = hasOverlay; + this->cursorLast = cursorState; desktopDamage->count = 0; app_eglSwapBuffers(this->display, this->surface, damage, damageIdx);