mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-09-22 12:07:15 +03:00
Fixed an instance of eager cursor loading.
Also fixed a minor formatting issue.
This commit is contained in:
parent
7c3c87abf6
commit
199ee20adb
2
glfw/wl_cursors.c
vendored
2
glfw/wl_cursors.c
vendored
@ -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
13
glfw/wl_window.c
vendored
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user