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 708439 - clutter-xi2: don't access the stage if we don't have one
clutter-xi2: don't access the stage if we don't have one
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2013-09-20 08:31 UTC by Giovanni Campagna
Modified: 2013-09-20 10:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
clutter-xi2: don't access the stage if we don't have one (1.08 KB, patch)
2013-09-20 08:31 UTC, Giovanni Campagna
needs-work Details | Review
x11: Ensure we have a stage before accessing its fields (1.09 KB, patch)
2013-09-20 09:57 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review

Description Giovanni Campagna 2013-09-20 08:31:30 UTC
For DeviceChanged and HierarchyChanged events we don't have the
stage, so we can't access the scale factor on it.
Fixes hotplugging of devices which would happen when switching VTs.
Comment 1 Giovanni Campagna 2013-09-20 08:31:32 UTC
Created attachment 255370 [details] [review]
clutter-xi2: don't access the stage if we don't have one
Comment 2 Emmanuele Bassi (:ebassi) 2013-09-20 09:52:01 UTC
Review of attachment 255370 [details] [review]:

::: clutter/x11/clutter-device-manager-xi2.c
@@ +778,3 @@
+    window_scale = stage_x11->scale_factor;
+  else
+    window_scale = 0;

I think you meant 1, here, otherwise you'll have a division by zero.
Comment 3 Emmanuele Bassi (:ebassi) 2013-09-20 09:57:59 UTC
Created attachment 255371 [details] [review]
x11: Ensure we have a stage before accessing its fields

For some XI2 we do not have a Stage associated to the event window.

Original patch by: Giovanni Campagna <scampa.giovanni@gmail.com>
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
Comment 4 Emmanuele Bassi (:ebassi) 2013-09-20 10:17:01 UTC
Review of attachment 255371 [details] [review]:

Pushed to clutter-1.16, and released with Clutter 1.15.96.
Comment 5 Emmanuele Bassi (:ebassi) 2013-09-20 10:17:33 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.