[Xfce4-commits] r26871 - xfce-mcs-plugins/trunk/plugins/mouse_plugin
Olivier Fourdan
olivier at xfce.org
Sat Apr 19 15:02:59 CEST 2008
Author: olivier
Date: 2008-04-19 13:02:59 +0000 (Sat, 19 Apr 2008)
New Revision: 26871
Modified:
xfce-mcs-plugins/trunk/plugins/mouse_plugin/mouse_plugin.c
Log:
Avoid endless loop when setting up mouse with XInput (Bug #3974, patch by Wolfgang Oertl <wolfgang.oertl at gmail.com>
Modified: xfce-mcs-plugins/trunk/plugins/mouse_plugin/mouse_plugin.c
===================================================================
--- xfce-mcs-plugins/trunk/plugins/mouse_plugin/mouse_plugin.c 2008-04-19 12:56:06 UTC (rev 26870)
+++ xfce-mcs-plugins/trunk/plugins/mouse_plugin/mouse_plugin.c 2008-04-19 13:02:59 UTC (rev 26871)
@@ -147,7 +147,7 @@
{
XDeviceInfo *device_info;
unsigned char *buttons;
- gint n_buttons, n_devices, i;
+ gint n_buttons, n_devices, i, j;
gint idx_1 = 0, idx_3 = 1;
gsize buttons_capacity = DEFAULT_PTR_MAP_SIZE;
@@ -187,15 +187,15 @@
n_buttons = XGetDeviceButtonMapping (GDK_DISPLAY (), device, buttons, buttons_capacity);
}
- for (i = 0; i < n_buttons; i++)
+ for (j = 0; j < n_buttons; j++)
{
- if (buttons[i] == 1)
+ if (buttons[j] == 1)
{
- idx_1 = i;
+ idx_1 = j;
}
- else if (buttons[i] == ((n_buttons < 3) ? 2 : 3))
+ else if (buttons[j] == ((n_buttons < 3) ? 2 : 3))
{
- idx_3 = i;
+ idx_3 = j;
}
}
More information about the Xfce4-commits
mailing list