From ca5ccd819d10f977df92944fc0792bb0f71e3fe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Wed, 13 Jul 2022 20:13:01 +0200 Subject: [PATCH] Wayland: Update state before emitting events (cherry picked from commit e47cb7c1e20f20b8f7d091e477be3fe41201836e) --- src/wl_window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wl_window.c b/src/wl_window.c index 87967cc7..dab453c2 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -1087,8 +1087,8 @@ static void pointerHandleLeave(void* userData, _glfw.wl.serial = serial; _glfw.wl.pointerFocus = NULL; - _glfwInputCursorEnter(window, GLFW_FALSE); _glfw.wl.cursorPreviousName = NULL; + _glfwInputCursorEnter(window, GLFW_FALSE); } static void setCursor(_GLFWwindow* window, const char* name) @@ -1159,8 +1159,8 @@ static void pointerHandleMotion(void* userData, switch (window->wl.decorations.focus) { case mainWindow: - _glfwInputCursorPos(window, x, y); _glfw.wl.cursorPreviousName = NULL; + _glfwInputCursorPos(window, x, y); return; case topDecoration: if (y < GLFW_BORDER_SIZE)