mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 20:12:06 +00:00
pointer: Split out the code that gets the proper focus surface as well
This commit is contained in:
parent
45df3e41c5
commit
020f209c45
@ -352,16 +352,21 @@ count_buttons (const ClutterEvent *event)
|
||||
return count;
|
||||
}
|
||||
|
||||
static void
|
||||
sync_focus_surface (MetaWaylandPointer *pointer)
|
||||
static MetaWaylandSurface *
|
||||
get_focus_surface (MetaWaylandPointer *pointer)
|
||||
{
|
||||
MetaWaylandSurface *focus_surface;
|
||||
MetaDisplay *display = meta_get_display ();
|
||||
|
||||
if (meta_grab_op_should_block_wayland (display->grab_op))
|
||||
focus_surface = NULL;
|
||||
else
|
||||
focus_surface = pointer->current;
|
||||
return NULL;
|
||||
|
||||
return pointer->current;
|
||||
}
|
||||
|
||||
static void
|
||||
sync_focus_surface (MetaWaylandPointer *pointer)
|
||||
{
|
||||
MetaWaylandSurface *focus_surface = get_focus_surface (pointer);
|
||||
|
||||
if (focus_surface != pointer->focus_surface)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user