[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.
This commit is contained in:
Quantum 2021-08-01 01:47:59 -04:00 committed by Geoffrey McRae
parent 90b90e667a
commit b3b71d6f02

View file

@ -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);