summaryrefslogtreecommitdiff
path: root/src/lib/ecore_x/xlib/ecore_x_xi2.c
diff options
context:
space:
mode:
authorJi-Youn Park <jy0703.park@samsung.com>2015-06-09 13:10:59 +0900
committerJi-Youn Park <jy0703.park@samsung.com>2015-06-09 13:10:59 +0900
commit0c386dbb160b4c04916c1e386e0a911872b9b079 (patch)
tree8eabcce11bb75315fedf6aba078d39a68147ebf0 /src/lib/ecore_x/xlib/ecore_x_xi2.c
parent105cf65c8078c45bf9a7d3f368b2d124b1f90a48 (diff)
ecore_x_xi2: remove useless define check XI_TouchXXX.
Summary: we can use XI_TouchXXX defines after xi2_2. So we don't need check XI_TouchXXX defines. I think it is simple only using the ECORE_XI2_2 define instead of using XI_TouchXXX defines.
Diffstat (limited to '')
-rw-r--r--src/lib/ecore_x/xlib/ecore_x_xi2.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/lib/ecore_x/xlib/ecore_x_xi2.c b/src/lib/ecore_x/xlib/ecore_x_xi2.c
index 2c37776ad2..f8fffd5868 100644
--- a/src/lib/ecore_x/xlib/ecore_x_xi2.c
+++ b/src/lib/ecore_x/xlib/ecore_x_xi2.c
@@ -304,9 +304,11 @@ _ecore_x_input_mouse_handler(XEvent *xevent)
304 304
305 switch (xevent->xcookie.evtype) 305 switch (xevent->xcookie.evtype)
306 { 306 {
307#ifdef ECORE_XI2_2
307 case XI_TouchUpdate: 308 case XI_TouchUpdate:
308 if (!_ecore_x_input_grabbed_is(devid)) 309 if (!_ecore_x_input_grabbed_is(devid))
309 break; 310 break;
311#endif
310 case XI_Motion: 312 case XI_Motion:
311 INF("Handling XI_Motion"); 313 INF("Handling XI_Motion");
312 _ecore_mouse_move 314 _ecore_mouse_move
@@ -325,9 +327,11 @@ _ecore_x_input_mouse_handler(XEvent *xevent)
325 evd->root_x, evd->root_y); 327 evd->root_x, evd->root_y);
326 break; 328 break;
327 329
330#ifdef ECORE_XI2_2
328 case XI_TouchBegin: 331 case XI_TouchBegin:
329 if (!_ecore_x_input_grabbed_is(devid)) 332 if (!_ecore_x_input_grabbed_is(devid))
330 break; 333 break;
334#endif
331 case XI_ButtonPress: 335 case XI_ButtonPress:
332 INF("ButtonEvent:multi press time=%u x=%d y=%d devid=%d", (unsigned int)evd->time, (int)evd->event_x, (int)evd->event_y, devid); 336 INF("ButtonEvent:multi press time=%u x=%d y=%d devid=%d", (unsigned int)evd->time, (int)evd->event_x, (int)evd->event_y, devid);
333 _ecore_mouse_button 337 _ecore_mouse_button
@@ -348,9 +352,11 @@ _ecore_x_input_mouse_handler(XEvent *xevent)
348 evd->root_x, evd->root_y); 352 evd->root_x, evd->root_y);
349 break; 353 break;
350 354
355#ifdef ECORE_XI2_2
351 case XI_TouchEnd: 356 case XI_TouchEnd:
352 if (!_ecore_x_input_grabbed_is(devid)) 357 if (!_ecore_x_input_grabbed_is(devid))
353 break; 358 break;
359#endif
354 case XI_ButtonRelease: 360 case XI_ButtonRelease:
355 INF("ButtonEvent:multi release time=%u x=%d y=%d devid=%d", (unsigned int)evd->time, (int)evd->event_x, (int)evd->event_y, devid); 361 INF("ButtonEvent:multi release time=%u x=%d y=%d devid=%d", (unsigned int)evd->time, (int)evd->event_x, (int)evd->event_y, devid);
356 _ecore_mouse_button 362 _ecore_mouse_button
@@ -623,9 +629,11 @@ _ecore_x_input_handler(XEvent *xevent)
623 case XI_Motion: 629 case XI_Motion:
624 case XI_ButtonPress: 630 case XI_ButtonPress:
625 case XI_ButtonRelease: 631 case XI_ButtonRelease:
632#ifdef ECORE_XI2_2
626 case XI_TouchUpdate: 633 case XI_TouchUpdate:
627 case XI_TouchBegin: 634 case XI_TouchBegin:
628 case XI_TouchEnd: 635 case XI_TouchEnd:
636#endif
629 { 637 {
630 XIDeviceEvent *evd = (XIDeviceEvent *)(xevent->xcookie.data); 638 XIDeviceEvent *evd = (XIDeviceEvent *)(xevent->xcookie.data);
631 XIDeviceInfo *dev = _ecore_x_input_device_lookup(evd->deviceid); 639 XIDeviceInfo *dev = _ecore_x_input_device_lookup(evd->deviceid);
@@ -695,13 +703,6 @@ ecore_x_input_multi_select(Ecore_X_Window win)
695 _ecore_x_xi2_touch_info_list = l; 703 _ecore_x_xi2_touch_info_list = l;
696 } 704 }
697#endif /* #ifdef ECORE_XI2_2 */ 705#endif /* #ifdef ECORE_XI2_2 */
698
699#if !defined (ECORE_XI2_2) && defined (XI_TouchUpdate) && defined (XI_TouchBegin) && defined (XI_TouchEnd)
700 XISetMask(mask, XI_TouchUpdate);
701 XISetMask(mask, XI_TouchBegin);
702 XISetMask(mask, XI_TouchEnd);
703#endif
704
705 update = 1; 706 update = 1;
706 } 707 }
707 708
@@ -791,13 +792,6 @@ _ecore_x_input_touch_devices_grab(Ecore_X_Window grab_win, Eina_Bool grab)
791 free(info); 792 free(info);
792 } 793 }
793#endif /* #ifdef ECORE_XI2_2 */ 794#endif /* #ifdef ECORE_XI2_2 */
794
795#if !defined (ECORE_XI2_2) && defined (XI_TouchUpdate) && defined (XI_TouchBegin) && defined (XI_TouchEnd)
796 XISetMask(mask, XI_TouchUpdate);
797 XISetMask(mask, XI_TouchBegin);
798 XISetMask(mask, XI_TouchEnd);
799 update = 1;
800#endif
801 } 795 }
802 796
803 if (update) 797 if (update)