Fixed an instance of eager cursor loading.
Also fixed a minor formatting issue.
This commit is contained in:
parent
7c3c87abf6
commit
199ee20adb
13
glfw/wl_window.c
vendored
13
glfw/wl_window.c
vendored
@ -1474,8 +1474,6 @@ static bool isPointerLocked(_GLFWwindow* window)
|
|||||||
|
|
||||||
void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)
|
void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)
|
||||||
{
|
{
|
||||||
struct wl_cursor* defaultCursor;
|
|
||||||
|
|
||||||
if (!_glfw.wl.pointer)
|
if (!_glfw.wl.pointer)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -1496,15 +1494,8 @@ void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)
|
|||||||
setCursorImage(window, &cursor->wl);
|
setCursorImage(window, &cursor->wl);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
defaultCursor = _glfwLoadCursor(GLFW_ARROW_CURSOR, window->wl.cursorTheme);
|
_GLFWcursorWayland cursorWayland = {0};
|
||||||
if (!defaultCursor) return;
|
cursorWayland.shape = GLFW_ARROW_CURSOR;
|
||||||
_GLFWcursorWayland cursorWayland = {
|
|
||||||
defaultCursor,
|
|
||||||
NULL,
|
|
||||||
0, 0,
|
|
||||||
0, 0,
|
|
||||||
0
|
|
||||||
};
|
|
||||||
setCursorImage(window, &cursorWayland);
|
setCursorImage(window, &cursorWayland);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user