forked from enlightenment/efl
From: Sung-Jin Park <sj76.park@samsung.com>
Subject: [E-devel] Bug fix : ecore x XI2 handler not to make button event twice Dear developers, I have fixed a bug in ecore x xi2 handler. Currently, ecore mouse down/move/up event are made twice for a X touch event. Among a couple of events, the first one is made by a X touch event and the other is made by a button event whose flags has XIPointerEmulated flag. The (latter) button event is made from the (former) X touch event whose flags has XITouchEmulatingPointer flag. Basically, X touch events doesn't have XITouchEmulatingPointer flag in its flags when it doesn't make a (XIPointerEmulated) button event. Thus I correct ecore_x_xi2.c not to make a mouse down/move/up event when a X touch event has XITouchEmulatingPointer flag. SVN revision: 82869
This commit is contained in:
parent
73b2f09b74
commit
01452373c7
|
@ -20,6 +20,10 @@ int _ecore_x_xi2_opcode = -1;
|
||||||
|
|
||||||
#ifdef ECORE_XI2
|
#ifdef ECORE_XI2
|
||||||
#ifdef ECORE_XI2_2
|
#ifdef ECORE_XI2_2
|
||||||
|
#ifndef XITouchEmulatingPointer
|
||||||
|
#define XITouchEmulatingPointer (1 << 17)
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct _Ecore_X_Touch_Device_Info
|
typedef struct _Ecore_X_Touch_Device_Info
|
||||||
{
|
{
|
||||||
EINA_INLIST;
|
EINA_INLIST;
|
||||||
|
@ -307,6 +311,7 @@ _ecore_x_input_handler(XEvent *xevent)
|
||||||
case XI_TouchUpdate:
|
case XI_TouchUpdate:
|
||||||
#ifdef ECORE_XI2_2
|
#ifdef ECORE_XI2_2
|
||||||
i = _ecore_x_input_touch_index_get(devid, evd->detail, XI_TouchUpdate);
|
i = _ecore_x_input_touch_index_get(devid, evd->detail, XI_TouchUpdate);
|
||||||
|
if ((i == 0) && (evd->flags & XITouchEmulatingPointer)) return;
|
||||||
#endif /* #ifdef ECORE_XI2_2 */
|
#endif /* #ifdef ECORE_XI2_2 */
|
||||||
_ecore_mouse_move
|
_ecore_mouse_move
|
||||||
(evd->time,
|
(evd->time,
|
||||||
|
@ -333,6 +338,7 @@ _ecore_x_input_handler(XEvent *xevent)
|
||||||
case XI_TouchBegin:
|
case XI_TouchBegin:
|
||||||
#ifdef ECORE_XI2_2
|
#ifdef ECORE_XI2_2
|
||||||
i = _ecore_x_input_touch_index_get(devid, evd->detail, XI_TouchBegin);
|
i = _ecore_x_input_touch_index_get(devid, evd->detail, XI_TouchBegin);
|
||||||
|
if ((i == 0) && (evd->flags & XITouchEmulatingPointer)) return;
|
||||||
#endif /* #ifdef ECORE_XI2_2 */
|
#endif /* #ifdef ECORE_XI2_2 */
|
||||||
_ecore_mouse_button
|
_ecore_mouse_button
|
||||||
(ECORE_EVENT_MOUSE_BUTTON_DOWN,
|
(ECORE_EVENT_MOUSE_BUTTON_DOWN,
|
||||||
|
@ -361,6 +367,11 @@ _ecore_x_input_handler(XEvent *xevent)
|
||||||
case XI_TouchEnd:
|
case XI_TouchEnd:
|
||||||
#ifdef ECORE_XI2_2
|
#ifdef ECORE_XI2_2
|
||||||
i = _ecore_x_input_touch_index_get(devid, evd->detail, XI_TouchEnd);
|
i = _ecore_x_input_touch_index_get(devid, evd->detail, XI_TouchEnd);
|
||||||
|
if ((i == 0) && (evd->flags & XITouchEmulatingPointer))
|
||||||
|
{
|
||||||
|
_ecore_x_input_touch_index_clear(devid, i);
|
||||||
|
return;
|
||||||
|
}
|
||||||
#endif /* #ifdef ECORE_XI2_2 */
|
#endif /* #ifdef ECORE_XI2_2 */
|
||||||
_ecore_mouse_button
|
_ecore_mouse_button
|
||||||
(ECORE_EVENT_MOUSE_BUTTON_UP,
|
(ECORE_EVENT_MOUSE_BUTTON_UP,
|
||||||
|
|
Loading…
Reference in New Issue