aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/e_mouse.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2008-09-20 02:23:51 +0000
committerCarsten Haitzler <raster@rasterman.com>2008-09-20 02:23:51 +0000
commitbd470ac03d9f97fd5395e56b804e53a07ea4c567 (patch)
tree578fd4c6a32e813ac65e7bd0ab40f3ef28ed257b /src/bin/e_mouse.c
parentillogict patch for dpms (diff)
downloadenlightenment-bd470ac03d9f97fd5395e56b804e53a07ea4c567.tar.gz
illogict - patch. lefty mouse etc.
- e-config-pointer_mapping_support.patch: and actually use that on Enlightenment SVN revision: 36114
Diffstat (limited to 'src/bin/e_mouse.c')
-rw-r--r--src/bin/e_mouse.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/bin/e_mouse.c b/src/bin/e_mouse.c
index a10e157b7..42f0fa35f 100644
--- a/src/bin/e_mouse.c
+++ b/src/bin/e_mouse.c
@@ -6,10 +6,23 @@
EAPI int
e_mouse_init(void)
{
+ unsigned char map[256];
+ int n;
+
if (!ecore_x_pointer_control_set(e_config->mouse_accel_numerator,
- e_config->mouse_accel_denominator,
- e_config->mouse_accel_threshold))
- return 0;
-
+ e_config->mouse_accel_denominator,
+ e_config->mouse_accel_threshold))
+ return 0;
+
+ if (!(n = ecore_x_pointer_mapping_get(map, 256))) return 0;
+
+ if (((e_config->mouse_hand == E_MOUSE_HAND_LEFT) && (map[2] != 1)) ||
+ ((e_config->mouse_hand == E_MOUSE_HAND_RIGHT) && (map[0] != 1)))
+ {
+ const unsigned char tmp = map[0];
+ map[0] = map[2]; map[2] = tmp;
+ if (ecore_x_pointer_mapping_set(map, n)) return 0;
+ }
+
return 1;
}