mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 20:12:06 +00:00
pointer: Unset the window cursor when we do a pick
... not when we do an update. We only repick when we handle events, not when we update. Perhaps this is a mistake. Since update runs before handle_event, this means that when we drop a grab, update will notice the NULL surface, since we haven't repicked after the event, and then we'll repick the correct surface. The end result is that you see a root cursor after a grab ends, rather than the correct window cursor. This doesn't fix it, since the current surface becomes NULL when we start the grab. But it does make the code here more correct when we fix that bug.
This commit is contained in:
parent
16bcbd1a34
commit
de7a644656
@ -357,6 +357,10 @@ update_current_focus (MetaWaylandPointer *pointer,
|
||||
MetaWaylandSurface *surface)
|
||||
{
|
||||
pointer->current = surface;
|
||||
|
||||
if (pointer->cursor_tracker && surface == NULL)
|
||||
meta_cursor_tracker_unset_window_cursor (pointer->cursor_tracker);
|
||||
|
||||
if (surface != pointer->focus_surface)
|
||||
{
|
||||
const MetaWaylandPointerGrabInterface *interface = pointer->grab->interface;
|
||||
@ -534,9 +538,6 @@ meta_wayland_pointer_update (MetaWaylandPointer *pointer,
|
||||
|
||||
clutter_input_device_get_coords (pointer->device, NULL, &pos);
|
||||
meta_cursor_tracker_update_position (pointer->cursor_tracker, pos.x, pos.y);
|
||||
|
||||
if (pointer->current == NULL)
|
||||
meta_cursor_tracker_unset_window_cursor (pointer->cursor_tracker);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user