forked from enlightenment/enlightenment
simplify e_mouse_update() code for x11 compositors
ref D3433
This commit is contained in:
parent
e40033be0a
commit
50e838ef0f
|
@ -3,20 +3,18 @@
|
||||||
E_API int
|
E_API int
|
||||||
e_mouse_update(void)
|
e_mouse_update(void)
|
||||||
{
|
{
|
||||||
unsigned char map[256] = { 0 };
|
|
||||||
int n;
|
|
||||||
|
|
||||||
#ifndef HAVE_WAYLAND_ONLY
|
#ifndef HAVE_WAYLAND_ONLY
|
||||||
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
|
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,
|
if (!ecore_x_pointer_control_set(e_config->mouse_accel_numerator,
|
||||||
e_config->mouse_accel_denominator,
|
e_config->mouse_accel_denominator,
|
||||||
e_config->mouse_accel_threshold))
|
e_config->mouse_accel_threshold))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!ecore_x_pointer_mapping_get(map, 256)) return 0;
|
if (!ecore_x_pointer_mapping_get(map, 256)) return 0;
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (n = 0; n < 256; n++)
|
for (n = 0; n < 256; n++)
|
||||||
{
|
{
|
||||||
|
@ -40,9 +38,8 @@ e_mouse_update(void)
|
||||||
map[2] = 1;
|
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
|
#endif
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in New Issue