[mutter] input-settings-x11: don't create non-existing atoms



commit b55f79230220b5fff130234490eb6e674fa50438
Author: Peter Hutterer <peter hutterer who-t net>
Date:   Thu Jun 25 07:55:52 2015 +1000

    input-settings-x11: don't create non-existing atoms
    
    If the atom doesn't exist it won't exist on the device either so we can
    shortcut the property retrieval/modification. Creating atoms by name but not
    doing anything with them also confuses kcm_touchpad
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1199825
    
    https://bugzilla.gnome.org/show_bug.cgi?id=751471

 src/backends/x11/meta-input-settings-x11.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/backends/x11/meta-input-settings-x11.c b/src/backends/x11/meta-input-settings-x11.c
index f683c47..cffc63e 100644
--- a/src/backends/x11/meta-input-settings-x11.c
+++ b/src/backends/x11/meta-input-settings-x11.c
@@ -50,7 +50,10 @@ get_property (ClutterInputDevice *device,
   Atom property_atom, type_ret;
   guchar *data_ret = NULL;
 
-  property_atom = XInternAtom (xdisplay, property, False);
+  property_atom = XInternAtom (xdisplay, property, True);
+  if (!property_atom)
+    return NULL;
+
   device_id = clutter_input_device_get_device_id (device);
 
   rc = XIGetProperty (xdisplay, device_id, property_atom,
@@ -82,7 +85,10 @@ change_property (ClutterInputDevice *device,
   Atom property_atom;
   guchar *data_ret;
 
-  property_atom = XInternAtom (xdisplay, property, False);
+  property_atom = XInternAtom (xdisplay, property, True);
+  if (!property_atom)
+    return;
+
   device_id = clutter_input_device_get_device_id (device);
 
   data_ret = get_property (device, property, type, format, nitems);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]