1
0
Fork 0

pointer: Split out the code that gets the proper focus surface as well

This commit is contained in:
Jasper St. Pierre 2014-04-18 18:54:35 -04:00
parent 45df3e41c5
commit 020f209c45

View file

@ -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)
{