Fixed an instance of eager cursor loading.

Also fixed a minor formatting issue.
This commit is contained in:
TheDaemoness 2020-05-30 10:07:49 -07:00 committed by Kovid Goyal
parent 7c3c87abf6
commit 199ee20adb
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 3 additions and 12 deletions

2
glfw/wl_cursors.c vendored
View File

@ -37,7 +37,7 @@ _themeInit(_themeData *dest, const char *name, int px) {
dest->theme = wl_cursor_theme_load(name, px, _glfw.wl.shm);
if(!dest->theme) {
_glfwInputError(GLFW_PLATFORM_ERROR,
"Wayland: Unable to load cursor theme");
"Wayland: Unable to load cursor theme");
}
} else {
dest->theme = NULL;

13
glfw/wl_window.c vendored
View File

@ -1474,8 +1474,6 @@ static bool isPointerLocked(_GLFWwindow* window)
void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)
{
struct wl_cursor* defaultCursor;
if (!_glfw.wl.pointer)
return;
@ -1496,15 +1494,8 @@ void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)
setCursorImage(window, &cursor->wl);
else
{
defaultCursor = _glfwLoadCursor(GLFW_ARROW_CURSOR, window->wl.cursorTheme);
if (!defaultCursor) return;
_GLFWcursorWayland cursorWayland = {
defaultCursor,
NULL,
0, 0,
0, 0,
0
};
_GLFWcursorWayland cursorWayland = {0};
cursorWayland.shape = GLFW_ARROW_CURSOR;
setCursorImage(window, &cursorWayland);
}
}