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:
@@ -1274,7 +1274,7 @@ static void pointer_handle_frame(void *data, struct wl_pointer *pointer)
|
|||||||
SDL_WaylandSeat *seat = data;
|
SDL_WaylandSeat *seat = data;
|
||||||
|
|
||||||
if (seat->pointer.pending_frame.enter_window) {
|
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.
|
// Leaving the previous surface before entering a new surface.
|
||||||
pointer_dispatch_leave(seat);
|
pointer_dispatch_leave(seat);
|
||||||
}
|
}
|
||||||
@@ -1320,7 +1320,7 @@ static void pointer_handle_frame(void *data, struct wl_pointer *pointer)
|
|||||||
pointer_dispatch_axis(seat);
|
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);
|
pointer_dispatch_leave(seat);
|
||||||
Wayland_SeatUpdatePointerGrab(seat);
|
Wayland_SeatUpdatePointerGrab(seat);
|
||||||
Wayland_SeatUpdatePointerCursor(seat);
|
Wayland_SeatUpdatePointerCursor(seat);
|
||||||
|
|||||||
Reference in New Issue
Block a user