wayland: Don't process null leave events in the pointer frame handler

This can cause the cursor to become invisible when passing over libdecor surfaces.
This commit is contained in:
Frank Praznik
2026-01-15 21:47:15 -05:00
parent f9395a766f
commit 55ba268e66

View File

@@ -1274,7 +1274,7 @@ static void pointer_handle_frame(void *data, struct wl_pointer *pointer)
SDL_WaylandSeat *seat = data;
if (seat->pointer.pending_frame.enter_window) {
if (seat->pointer.pending_frame.leave_window == seat->pointer.focus) {
if (seat->pointer.focus && seat->pointer.pending_frame.leave_window == seat->pointer.focus) {
// Leaving the previous surface before entering a new surface.
pointer_dispatch_leave(seat);
}
@@ -1320,7 +1320,7 @@ static void pointer_handle_frame(void *data, struct wl_pointer *pointer)
pointer_dispatch_axis(seat);
}
if (seat->pointer.pending_frame.leave_window == seat->pointer.focus) {
if (seat->pointer.focus && seat->pointer.pending_frame.leave_window == seat->pointer.focus) {
pointer_dispatch_leave(seat);
Wayland_SeatUpdatePointerGrab(seat);
Wayland_SeatUpdatePointerCursor(seat);