From b55f79230220b5fff130234490eb6e674fa50438 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 25 Jun 2015 07:55:52 +1000 Subject: [PATCH] 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 file 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 f683c4788..cffc63e8e 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);