1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 10:48:51 -05:00

Wayland: Unset the cursor name on border exit

It would previously conserve the last name it had before leaving the
border, sometimes desynchronising with what it should have been.

(cherry picked from commit ef6189f348)
This commit is contained in:
Emmanuel Gil Peyrot 2019-11-28 15:47:09 +01:00 committed by Camilla Löwy
parent df4bda44fc
commit 9db0bd45e6

View File

@ -125,6 +125,7 @@ static void pointerHandleLeave(void* data,
_glfw.wl.serial = serial; _glfw.wl.serial = serial;
_glfw.wl.pointerFocus = NULL; _glfw.wl.pointerFocus = NULL;
_glfwInputCursorEnter(window, GLFW_FALSE); _glfwInputCursorEnter(window, GLFW_FALSE);
_glfw.wl.cursorPreviousName = NULL;
} }
static void setCursor(_GLFWwindow* window, const char* name) static void setCursor(_GLFWwindow* window, const char* name)
@ -196,6 +197,7 @@ static void pointerHandleMotion(void* data,
window->wl.cursorPosX = x; window->wl.cursorPosX = x;
window->wl.cursorPosY = y; window->wl.cursorPosY = y;
_glfwInputCursorPos(window, x, y); _glfwInputCursorPos(window, x, y);
_glfw.wl.cursorPreviousName = NULL;
return; return;
case topDecoration: case topDecoration:
if (y < _GLFW_DECORATION_WIDTH) if (y < _GLFW_DECORATION_WIDTH)