Output debug lines for when kitty sets the pointer in Wayland

This commit is contained in:
Kovid Goyal 2022-04-30 09:13:08 +05:30
parent 8c67f5aea8
commit c48bf4fd85
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 0 deletions

1
glfw/wl_init.c vendored
View File

@ -147,6 +147,7 @@ static void setCursor(GLFWCursorShape shape, _GLFWwindow* window)
buffer = wl_cursor_image_get_buffer(image);
if (!buffer)
return;
debug("Calling wl_pointer_set_cursor in setCursor with surface: %p\n", (void*)surface);
wl_pointer_set_cursor(_glfw.wl.pointer, _glfw.wl.serial,
surface,
image->hotspot_x / scale,

3
glfw/wl_window.c vendored
View File

@ -147,6 +147,7 @@ setCursorImage(_GLFWwindow* window, bool on_theme_change) {
cursorWayland->yhot = image->hotspot_y;
}
debug("Calling wl_pointer_set_cursor in setCursorImage with surface: %p\n", (void*)surface);
wl_pointer_set_cursor(_glfw.wl.pointer, _glfw.wl.serial,
surface,
cursorWayland->xhot / scale,
@ -1397,6 +1398,7 @@ static void lockPointer(_GLFWwindow* window)
window->wl.pointerLock.relativePointer = relativePointer;
window->wl.pointerLock.lockedPointer = lockedPointer;
debug("Calling wl_pointer_set_cursor in lockPointer with surface: %p\n", NULL);
wl_pointer_set_cursor(_glfw.wl.pointer, _glfw.wl.serial,
NULL, 0, 0);
}
@ -1433,6 +1435,7 @@ void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)
}
else if (window->cursorMode == GLFW_CURSOR_HIDDEN)
{
debug("Calling wl_pointer_set_cursor in _glfwPlatformSetCursor with surface: %p\n", NULL);
wl_pointer_set_cursor(_glfw.wl.pointer, _glfw.wl.serial, NULL, 0, 0);
}
}