GNOME Bugzilla – Bug 708439
clutter-xi2: don't access the stage if we don't have one
Last modified: 2013-09-20 10:17:33 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.
Created attachment 255370 [details] [review] clutter-xi2: don't access the stage if we don't have one
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.
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>
Review of attachment 255371 [details] [review]: Pushed to clutter-1.16, and released with Clutter 1.15.96.
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.