From a8dd848ca4ed6b023e9d783a0e68e3f759e8423e Mon Sep 17 00:00:00 2001 From: Tomas Frydrych Date: Fri, 17 Oct 2008 11:02:04 +0100 Subject: [PATCH] Connect to captured-event signal on stage for generic panel processing This is to allow the panel to handle events the normal way without interference --- src/compositor/mutter/plugins/scratch.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/compositor/mutter/plugins/scratch.c b/src/compositor/mutter/plugins/scratch.c index 4943239ad..d698a5016 100644 --- a/src/compositor/mutter/plugins/scratch.c +++ b/src/compositor/mutter/plugins/scratch.c @@ -754,7 +754,7 @@ stage_input_cb (ClutterActor *stage, ClutterEvent *event, gpointer data) priv->panel_out = FALSE; } - return TRUE; + return FALSE; } else if (mev->y < PANEL_SLIDE_THRESHOLD) { @@ -768,7 +768,7 @@ stage_input_cb (ClutterActor *stage, ClutterEvent *event, gpointer data) priv->panel_out = TRUE; - return TRUE; + return FALSE; } return FALSE; @@ -913,8 +913,12 @@ do_init (const char *params) clutter_actor_set_position (panel, 0, -clutter_actor_get_height (panel)); + /* + * Hook to the captured signal, so we get to see all events before our + * children and do not interfere with their event processing. + */ g_signal_connect (mutter_plugin_get_stage (plugin), - "motion-event", G_CALLBACK (stage_input_cb), NULL); + "captured-event", G_CALLBACK (stage_input_cb), NULL); mutter_plugin_set_stage_input_area (plugin, 0, 0, screen_width, 1);