mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 19:40:43 -05:00
pointer: Only the focus_surface should only be influenced by the grab
... not the normal current. That should *always* be the surface under the pointer, regardless of events.
This commit is contained in:
parent
3e554efc70
commit
1a723954fc
@ -358,6 +358,7 @@ repick_for_event (MetaWaylandPointer *pointer,
|
|||||||
{
|
{
|
||||||
ClutterActor *actor = NULL;
|
ClutterActor *actor = NULL;
|
||||||
MetaDisplay *display = meta_get_display ();
|
MetaDisplay *display = meta_get_display ();
|
||||||
|
MetaWaylandSurface *focus_surface;
|
||||||
|
|
||||||
if (for_event)
|
if (for_event)
|
||||||
{
|
{
|
||||||
@ -377,7 +378,7 @@ repick_for_event (MetaWaylandPointer *pointer,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (META_IS_SURFACE_ACTOR_WAYLAND (actor) && !meta_grab_op_should_block_wayland (display->grab_op))
|
if (META_IS_SURFACE_ACTOR_WAYLAND (actor))
|
||||||
pointer->current = 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
|
else
|
||||||
pointer->current = NULL;
|
pointer->current = NULL;
|
||||||
@ -385,10 +386,15 @@ repick_for_event (MetaWaylandPointer *pointer,
|
|||||||
if (pointer->cursor_tracker && pointer->current == NULL)
|
if (pointer->cursor_tracker && pointer->current == NULL)
|
||||||
meta_cursor_tracker_unset_window_cursor (pointer->cursor_tracker);
|
meta_cursor_tracker_unset_window_cursor (pointer->cursor_tracker);
|
||||||
|
|
||||||
if (pointer->current != pointer->focus_surface)
|
if (meta_grab_op_should_block_wayland (display->grab_op))
|
||||||
|
focus_surface = NULL;
|
||||||
|
else
|
||||||
|
focus_surface = pointer->current;
|
||||||
|
|
||||||
|
if (focus_surface != pointer->focus_surface)
|
||||||
{
|
{
|
||||||
const MetaWaylandPointerGrabInterface *interface = pointer->grab->interface;
|
const MetaWaylandPointerGrabInterface *interface = pointer->grab->interface;
|
||||||
interface->focus (pointer->grab, pointer->current);
|
interface->focus (pointer->grab, focus_surface);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user