[mutter/wip/wayland] Don't assume the plugin will pass X events to Clutter



commit 3b64818fee2c7ea6620b48ce4087446500af1817
Author: Neil Roberts <neil linux intel com>
Date:   Wed Jun 19 14:24:54 2013 +0100

    Don't assume the plugin will pass X events to Clutter
    
    Instead of making it the responsibility of the plugin to forward X
    events to Clutter in its event filter, this is now handled by Mutter
    itself. When Mutter is running as its own display server it shouldn't
    forward the events to Clutter. If we make it Mutter's responsibility
    then it's easier to contain this decision in one place.

 src/compositor/meta-plugin-manager.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/src/compositor/meta-plugin-manager.c b/src/compositor/meta-plugin-manager.c
index ad2ae7b..33e3fee 100644
--- a/src/compositor/meta-plugin-manager.c
+++ b/src/compositor/meta-plugin-manager.c
@@ -310,13 +310,15 @@ meta_plugin_manager_xevent_filter (MetaPluginManager *plugin_mgr,
   MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
 
   /* We need to make sure that clutter gets certain events, like
-   * ConfigureNotify on the stage window. If there is a plugin that
-   * provides an xevent_filter function, then it's the responsibility
-   * of that plugin to pass events to Clutter. Otherwise, we send the
-   * event directly to Clutter ourselves.
+   * ConfigureNotify on the stage window. The plugin should not
+   * forward on the events to Clutter because that will be done in
+   * this function. If the plugin wants to prevent clutter from seeing
+   * the event it can return TRUE here.
    */
-  if (klass->xevent_filter)
-    return klass->xevent_filter (plugin, xev);
+
+  if (klass->xevent_filter &&
+      klass->xevent_filter (plugin, xev))
+    return TRUE;
 
   if (meta_is_display_server ())
     return FALSE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]