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 689401 - xi2: Abort early if we don't have a proper GDK window
xi2: Abort early if we don't have a proper GDK window
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2012-12-01 01:49 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2012-12-14 02:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
xi2: Abort early if we don't have a proper GDK window (2.37 KB, patch)
2012-12-01 01:49 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2012-12-01 01:49:49 UTC
This is necessary for the mutter port to XI2, and this is what
the core device manager did. See patch.
Comment 1 Jasper St. Pierre (not reading bugmail) 2012-12-01 01:49:51 UTC
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.
Comment 2 Matthias Clasen 2012-12-03 04:29:31 UTC
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.
Comment 3 Jasper St. Pierre (not reading bugmail) 2012-12-05 18:37:42 UTC
(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.
Comment 4 Jasper St. Pierre (not reading bugmail) 2012-12-14 02:36:55 UTC
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.