mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05: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;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static MetaWaylandSurface *
|
||||||
sync_focus_surface (MetaWaylandPointer *pointer)
|
get_focus_surface (MetaWaylandPointer *pointer)
|
||||||
{
|
{
|
||||||
MetaWaylandSurface *focus_surface;
|
|
||||||
MetaDisplay *display = meta_get_display ();
|
MetaDisplay *display = meta_get_display ();
|
||||||
|
|
||||||
if (meta_grab_op_should_block_wayland (display->grab_op))
|
if (meta_grab_op_should_block_wayland (display->grab_op))
|
||||||
focus_surface = NULL;
|
return NULL;
|
||||||
else
|
|
||||||
focus_surface = pointer->current;
|
return pointer->current;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
sync_focus_surface (MetaWaylandPointer *pointer)
|
||||||
|
{
|
||||||
|
MetaWaylandSurface *focus_surface = get_focus_surface (pointer);
|
||||||
|
|
||||||
if (focus_surface != pointer->focus_surface)
|
if (focus_surface != pointer->focus_surface)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user