summaryrefslogtreecommitdiff
path: root/plugins/common/msd-input-helper.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-10-27 18:18:05 +0300
committermonsta <[email protected]>2016-10-27 18:18:05 +0300
commit88930d3d5f49720ee22c4aeefacad1f88bfac838 (patch)
tree623b0825c5c14cf17fe81f7cf2e0ab4d19890e49 /plugins/common/msd-input-helper.c
parent6dda2942a3bd70767476186d4fd9c186f1891000 (diff)
downloadmate-settings-daemon-88930d3d5f49720ee22c4aeefacad1f88bfac838.tar.bz2
mate-settings-daemon-88930d3d5f49720ee22c4aeefacad1f88bfac838.tar.xz
mouse: don't copy struct when it's not needed, pass pointer instead
Diffstat (limited to 'plugins/common/msd-input-helper.c')
-rw-r--r--plugins/common/msd-input-helper.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/common/msd-input-helper.c b/plugins/common/msd-input-helper.c
index b8e87a3..d5dd0c9 100644
--- a/plugins/common/msd-input-helper.c
+++ b/plugins/common/msd-input-helper.c
@@ -42,7 +42,7 @@ supports_xinput_devices (void)
}
XDevice*
-device_is_touchpad (XDeviceInfo deviceinfo)
+device_is_touchpad (XDeviceInfo *deviceinfo)
{
XDevice *device;
Atom realtype, prop;
@@ -50,7 +50,7 @@ device_is_touchpad (XDeviceInfo deviceinfo)
unsigned long nitems, bytes_after;
unsigned char *data;
- if (deviceinfo.type != XInternAtom (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), XI_TOUCHPAD, False))
+ if (deviceinfo->type != XInternAtom (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), XI_TOUCHPAD, False))
return NULL;
prop = XInternAtom (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), "Synaptics Off", False);
@@ -58,7 +58,7 @@ device_is_touchpad (XDeviceInfo deviceinfo)
return NULL;
gdk_error_trap_push ();
- device = XOpenDevice (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), deviceinfo.id);
+ device = XOpenDevice (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), deviceinfo->id);
if (gdk_error_trap_pop () || (device == NULL))
return NULL;
@@ -104,7 +104,7 @@ touchpad_is_present (void)
for (i = 0; i < n_devices; i++) {
XDevice *device;
- device = device_is_touchpad (device_info[i]);
+ device = device_is_touchpad (&device_info[i]);
if (device != NULL) {
retval = TRUE;
break;