aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/e_mouse.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-12-16 16:40:01 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-12-16 16:40:01 -0500
commit50e838ef0f2b87e43685dbb8366186a4fe338fb8 (patch)
tree5b654460334685e459ca9ca778474776906a048a /src/bin/e_mouse.c
parentFix type of size fields for E_Shell_Data (diff)
downloadenlightenment-50e838ef0f2b87e43685dbb8366186a4fe338fb8.tar.gz
simplify e_mouse_update() code for x11 compositors
Diffstat (limited to 'src/bin/e_mouse.c')
-rw-r--r--src/bin/e_mouse.c55
1 files changed, 26 insertions, 29 deletions
diff --git a/src/bin/e_mouse.c b/src/bin/e_mouse.c
index 5de709d86..5aaa561e5 100644
--- a/src/bin/e_mouse.c
+++ b/src/bin/e_mouse.c
@@ -3,46 +3,43 @@
E_API int
e_mouse_update(void)
{
- unsigned char map[256] = { 0 };
- int n;
-
#ifndef HAVE_WAYLAND_ONLY
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
{
+ unsigned char map[256] = { 0 };
+ 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;
if (!ecore_x_pointer_mapping_get(map, 256)) return 0;
- }
-#endif
- for (n = 0; n < 256; n++)
- {
- if (!map[n]) break;
- }
- if (n < 3)
- {
- map[0] = 1;
- map[1] = 2;
- map[2] = 3;
- n = 3;
- }
- if (e_config->mouse_hand == E_MOUSE_HAND_RIGHT)
- {
- map[0] = 1;
- map[2] = 3;
- }
- else if (e_config->mouse_hand == E_MOUSE_HAND_LEFT)
- {
- map[0] = 3;
- map[2] = 1;
- }
+ for (n = 0; n < 256; n++)
+ {
+ if (!map[n]) break;
+ }
+ if (n < 3)
+ {
+ map[0] = 1;
+ map[1] = 2;
+ map[2] = 3;
+ n = 3;
+ }
+ if (e_config->mouse_hand == E_MOUSE_HAND_RIGHT)
+ {
+ map[0] = 1;
+ map[2] = 3;
+ }
+ else if (e_config->mouse_hand == E_MOUSE_HAND_LEFT)
+ {
+ map[0] = 3;
+ map[2] = 1;
+ }
-#ifndef HAVE_WAYLAND_ONLY
- if (e_comp->comp_type == E_PIXMAP_TYPE_X)
- if (!ecore_x_pointer_mapping_set(map, n)) return 0;
+ if (!ecore_x_pointer_mapping_set(map, n)) return 0;
+ }
#endif
return 1;