forked from AuroraMiddleware/gtk
wayland: Keep the last cursor on leave, try to restore it on enter
On DnD, pointer_handle_leave may be triggered without the pointer actually leaving the window, and pointer_handle_enter() happening after intra-window DnD won't actually manage to update the cursor (it does nothing directly, and to the upper layers the cursor is still the same and consistent, so no attempt will happen). To fix this, keep the pointer cursor on leave, and ensure it is updated on enter. The pointer cursor will be updated to any current new one through the enter/motion events generated if it needs be. https://bugzilla.gnome.org/show_bug.cgi?id=735831
This commit is contained in:
parent
a0abdbbdd6
commit
2c71b8f599
@ -684,6 +684,8 @@ pointer_handle_enter (void *data,
|
||||
event->crossing.focus = TRUE;
|
||||
event->crossing.state = 0;
|
||||
|
||||
gdk_wayland_device_update_window_cursor (device);
|
||||
|
||||
get_coordinates (device,
|
||||
&event->crossing.x,
|
||||
&event->crossing.y,
|
||||
@ -728,6 +730,8 @@ pointer_handle_leave (void *data,
|
||||
event->crossing.focus = TRUE;
|
||||
event->crossing.state = 0;
|
||||
|
||||
gdk_wayland_device_update_window_cursor (device);
|
||||
|
||||
get_coordinates (device,
|
||||
&event->crossing.x,
|
||||
&event->crossing.y,
|
||||
@ -742,11 +746,7 @@ pointer_handle_leave (void *data,
|
||||
|
||||
g_object_unref(device->pointer_focus);
|
||||
if (device->cursor)
|
||||
{
|
||||
gdk_wayland_device_stop_window_cursor_animation (device);
|
||||
g_object_unref (device->cursor);
|
||||
device->cursor = NULL;
|
||||
}
|
||||
gdk_wayland_device_stop_window_cursor_animation (device);
|
||||
|
||||
device->pointer_focus = NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user