After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 589419 - Pass event to clutter when the plugin doesn't have xevent_filter
Pass event to clutter when the plugin doesn't have xevent_filter
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
: 590992 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-07-22 18:58 UTC by Owen Taylor
Modified: 2009-08-06 21:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Pass event to clutter when the plugin doesn't have xevent_filter (2.59 KB, patch)
2009-07-22 18:58 UTC, Owen Taylor
none Details | Review

Description Owen Taylor 2009-07-22 18:58:00 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.
Comment 1 Owen Taylor 2009-07-22 18:58:04 UTC
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.
Comment 2 Tomas Frydrych 2009-07-23 08:19:29 UTC
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.
Comment 3 Owen Taylor 2009-07-28 20:02:47 UTC
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.
Comment 4 Owen Taylor 2009-08-06 21:01:55 UTC
*** Bug 590992 has been marked as a duplicate of this bug. ***