GNOME Bugzilla – Bug 589419
Pass event to clutter when the plugin doesn't have xevent_filter
Last modified: 2009-08-06 21:01:55 UTC
This fix is needed to get the default plugin (or no plugin) working - otherwise you get a garbage display because the viewport is never initialized. The other approach to fixing it would be to make Mutter always call clutter_x11_handle_event() rather than the plugin. This would work for both gnome-shell and mutter_moblin but would require code changes to the plugins. And this way does give the plugin more flexibility. The main downside is that it doesn't make much logical sense if you have multiple competing plugins. I'm generally of the opinion that we shouldn't even allow more than one plugin.
Created attachment 139016 [details] [review] Pass event to clutter when the plugin doesn't have xevent_filter With recent changes, Clutter no longer sets up the viewport correctly, unless it receives ConfigureNotify events. If there is a plugin with an xevent_filter function, then it's that plugins responsibility to pass the event to Clutter if it doesn't want it. If there is no plugin, or the plugin doesn't have an xevent_filter function, then we should call clutter_x11_handle_event() ourselves.
The patch looks good as a solution to the immediate problem. (In reply to comment #0) > The other approach to fixing it would be to make Mutter always call > clutter_x11_handle_event() rather than the plugin. This would work for > both gnome-shell and mutter_moblin but would require code changes to > the plugins. That would make sense to me; I would still want the xevent hook, but we should probably be passing all events to Clutter that plugin xevent_fiter() function did not handle, rather than expect the plugins to do this. > I'm generally of the opinion that we shouldn't even allow more > than one plugin. I would be inclined to agree. When the multiple plugins framework was put in place we did not anticipate the plugins would do the sort of things that the GShell or MutterMoblin are doing; with the benefit of hindsight making multiple plugins that do anything slightly more involved than a simple effect for windows mapping, etc., work is hard. As soon as plugins start requiring user interaction, it all breaks down, as the current infrastructure for things like setting up input regions is not up to the task. Limiting ourselves to a single plugin would allow to simplify things a bit.
I've pushed things as is, just adding a FIXME describing the alternate approach of always sending the event to clutter. It doesn't seem: A) Worthwhile to break compatibility and have people have weird problems from mismatched mutter and gnome-shell or moblin. B) Worthwhile to keep a bug open.
*** Bug 590992 has been marked as a duplicate of this bug. ***