GNOME Bugzilla – Bug 689401
xi2: Abort early if we don't have a proper GDK window
Last modified: 2012-12-14 02:36:58 UTC
This is necessary for the mutter port to XI2, and this is what the core device manager did. See patch.
Created attachment 230371 [details] [review] xi2: Abort early if we don't have a proper GDK window This can happen in mutter or other applications that use GDK filters but don't actually create GDK windows for everything they get events for.
Review of attachment 230371 [details] [review]: ::: gdk/x11/gdkdevicemanager-xi2.c @@ +921,3 @@ get_event_window (GdkEventTranslator *translator, + XIEvent *ev, + GdkWindow **window_p) Why change this to a somewhat awkward out param ? I'd rather just return NULL and have callers check for that.
(In reply to comment #2) > Review of attachment 230371 [details] [review]: > > ::: gdk/x11/gdkdevicemanager-xi2.c > @@ +921,3 @@ > get_event_window (GdkEventTranslator *translator, > + XIEvent *ev, > + GdkWindow **window_p) > > Why change this to a somewhat awkward out param ? > I'd rather just return NULL and have callers check for that. It's possible for NULL to be a valid window for some event types, in which case we don't want to exit early.
Attachment 230371 [details] pushed as 9dc4c5c - xi2: Abort early if we don't have a proper GDK window Pushing this as the mutter XI2 port depends on it. Feel free to revert if this is causing issues.