mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-02-13 07:13:35 +00:00
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;
|
||||
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user