diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2015-06-25 07:55:52 +1000 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2015-06-26 21:52:45 -0700 |
commit | b55f79230220b5fff130234490eb6e674fa50438 (patch) | |
tree | 7d0eeb37e43d3fdf2e308de02fddaaa0ac164a2d /src/backends/x11/meta-input-settings-x11.c | |
parent | dd060d78ceee53cad106418374f8f4bd4d250cde (diff) | |
download | mutter-b55f79230220b5fff130234490eb6e674fa50438.tar.gz |
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
Diffstat (limited to 'src/backends/x11/meta-input-settings-x11.c')
-rw-r--r-- | 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 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); |