pointer: Clean up repick_for_event a bit
This commit is contained in:
parent
d68da0b8cf
commit
3e554efc70
@ -356,9 +356,8 @@ static void
|
|||||||
repick_for_event (MetaWaylandPointer *pointer,
|
repick_for_event (MetaWaylandPointer *pointer,
|
||||||
const ClutterEvent *for_event)
|
const ClutterEvent *for_event)
|
||||||
{
|
{
|
||||||
ClutterActor *actor = NULL;
|
ClutterActor *actor = NULL;
|
||||||
MetaWaylandSurface *surface = NULL;
|
MetaDisplay *display = meta_get_display ();
|
||||||
MetaDisplay *display = meta_get_display ();
|
|
||||||
|
|
||||||
if (for_event)
|
if (for_event)
|
||||||
{
|
{
|
||||||
@ -378,21 +377,18 @@ repick_for_event (MetaWaylandPointer *pointer,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (META_IS_SURFACE_ACTOR_WAYLAND (actor))
|
if (META_IS_SURFACE_ACTOR_WAYLAND (actor) && !meta_grab_op_should_block_wayland (display->grab_op))
|
||||||
surface = meta_surface_actor_wayland_get_surface (META_SURFACE_ACTOR_WAYLAND (actor));
|
pointer->current = meta_surface_actor_wayland_get_surface (META_SURFACE_ACTOR_WAYLAND (actor));
|
||||||
|
else
|
||||||
|
pointer->current = NULL;
|
||||||
|
|
||||||
if (meta_grab_op_should_block_wayland (display->grab_op))
|
if (pointer->cursor_tracker && pointer->current == NULL)
|
||||||
surface = NULL;
|
|
||||||
|
|
||||||
pointer->current = surface;
|
|
||||||
|
|
||||||
if (pointer->cursor_tracker && surface == NULL)
|
|
||||||
meta_cursor_tracker_unset_window_cursor (pointer->cursor_tracker);
|
meta_cursor_tracker_unset_window_cursor (pointer->cursor_tracker);
|
||||||
|
|
||||||
if (surface != pointer->focus_surface)
|
if (pointer->current != pointer->focus_surface)
|
||||||
{
|
{
|
||||||
const MetaWaylandPointerGrabInterface *interface = pointer->grab->interface;
|
const MetaWaylandPointerGrabInterface *interface = pointer->grab->interface;
|
||||||
interface->focus (pointer->grab, surface);
|
interface->focus (pointer->grab, pointer->current);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user