events: Fix get_window_for_event for the new route logic

I forgot to write the new logic for this function.
This commit is contained in:
Jasper St. Pierre 2014-08-15 17:35:40 -04:00
parent fb6438cdd4
commit 977de8c5d4

View File

@ -42,6 +42,10 @@
static MetaWindow * static MetaWindow *
get_window_for_event (MetaDisplay *display, get_window_for_event (MetaDisplay *display,
const ClutterEvent *event) const ClutterEvent *event)
{
switch (display->event_route)
{
case META_EVENT_ROUTE_NORMAL:
{ {
ClutterActor *source; ClutterActor *source;
@ -58,9 +62,17 @@ get_window_for_event (MetaDisplay *display,
source = clutter_event_get_source (event); source = clutter_event_get_source (event);
if (META_IS_SURFACE_ACTOR (source)) if (META_IS_SURFACE_ACTOR (source))
return meta_surface_actor_get_window (META_SURFACE_ACTOR (source)); return meta_surface_actor_get_window (META_SURFACE_ACTOR (source));
else
return NULL; return NULL;
} }
case META_EVENT_ROUTE_WAYLAND_POPUP:
case META_EVENT_ROUTE_WINDOW_OP:
case META_EVENT_ROUTE_COMPOSITOR_GRAB:
return display->grab_window;
default:
g_assert_not_reached ();
}
}
static void static void
handle_idletime_for_event (const ClutterEvent *event) handle_idletime_for_event (const ClutterEvent *event)