CSD pointer enter is the same as move

This commit is contained in:
Kovid Goyal 2024-04-06 12:51:09 +05:30
parent 60cb0fa650
commit a158fa108b
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 8 additions and 7 deletions

View file

@ -538,11 +538,6 @@ set_cursor(GLFWCursorShape shape, _GLFWwindow* window)
}
static void
handle_pointer_enter(_GLFWwindow *window) {
(void)window;
}
static void
handle_pointer_leave(_GLFWwindow *window) {
(void)window;
@ -584,7 +579,12 @@ handle_pointer_move(_GLFWwindow *window) {
if (_glfw.wl.cursorPreviousShape != cursorShape) set_cursor(cursorShape, window);
}
void
static void
handle_pointer_enter(_GLFWwindow *window) {
handle_pointer_move(window); // enter is also a move
}
static void
handle_pointer_button(_GLFWwindow *window, uint32_t button, uint32_t state) {
uint32_t edges = XDG_TOPLEVEL_RESIZE_EDGE_NONE;

3
glfw/wl_init.c vendored
View file

@ -127,7 +127,8 @@ pointerHandleLeave(void* data UNUSED, struct wl_pointer* pointer UNUSED, uint32_
} else csd_handle_pointer_event(window, -3, -3);
}
static void pointerHandleMotion(void* data UNUSED, struct wl_pointer* pointer UNUSED, uint32_t time UNUSED, wl_fixed_t sx, wl_fixed_t sy) {
static void
pointerHandleMotion(void* data UNUSED, struct wl_pointer* pointer UNUSED, uint32_t time UNUSED, wl_fixed_t sx, wl_fixed_t sy) {
_GLFWwindow* window = _glfw.wl.pointerFocus;
if (!window) return;
if (window->cursorMode == GLFW_CURSOR_DISABLED) return;