summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-11-25 18:21:26 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-11-25 18:21:26 +0900
commit83a3b45e3386852c21ad79753abdf9bb680cd06b (patch)
tree6823ffe40c8da8f6a0dc1bc53a28925f3751654b
parent731bf3c34ed2469596804e2d45022ed9bc15a29a (diff)
ecore-xi2 - fix issue with ifdefs and moustache nesting
don't ask how this worked at all... it did... until you change some ifdefs
-rw-r--r--src/lib/ecore_x/xlib/ecore_x_xi2.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/lib/ecore_x/xlib/ecore_x_xi2.c b/src/lib/ecore_x/xlib/ecore_x_xi2.c
index ae9ccc068e..a06eec0aa0 100644
--- a/src/lib/ecore_x/xlib/ecore_x_xi2.c
+++ b/src/lib/ecore_x/xlib/ecore_x_xi2.c
@@ -378,9 +378,9 @@ _ecore_x_input_multi_handler(XEvent *xevent)
378 0.0, // angle 378 0.0, // angle
379 evd->event_x, evd->event_y, 379 evd->event_x, evd->event_y,
380 evd->root_x, evd->root_y); 380 evd->root_x, evd->root_y);
381#endif
381 } 382 }
382 break; 383 break;
383#endif
384 384
385#ifdef XI_TouchBegin 385#ifdef XI_TouchBegin
386 case XI_TouchBegin: 386 case XI_TouchBegin:
@@ -409,9 +409,9 @@ _ecore_x_input_multi_handler(XEvent *xevent)
409 0.0, // angle 409 0.0, // angle
410 evd->event_x, evd->event_y, 410 evd->event_x, evd->event_y,
411 evd->root_x, evd->root_y); 411 evd->root_x, evd->root_y);
412#endif
412 } 413 }
413 break; 414 break;
414#endif
415 415
416#ifdef XI_TouchEnd 416#ifdef XI_TouchEnd
417 case XI_TouchEnd: 417 case XI_TouchEnd:
@@ -446,17 +446,19 @@ _ecore_x_input_multi_handler(XEvent *xevent)
446 evd->root_x, evd->root_y); 446 evd->root_x, evd->root_y);
447#ifdef ECORE_XI2_2 447#ifdef ECORE_XI2_2
448 _ecore_x_input_touch_index_clear(devid, i); 448 _ecore_x_input_touch_index_clear(devid, i);
449 }
450#endif /* #ifdef ECORE_XI2_2 */ 449#endif /* #ifdef ECORE_XI2_2 */
451 break;
452#endif 450#endif
451 }
452 break;
453 default:
454 break;
453 } 455 }
454#endif /* ifdef ECORE_XI2 */ 456#endif /* ifdef ECORE_XI2 */
455} 457}
456 458
457#ifdef ECORE_XI2 459#ifdef ECORE_XI2
458static unsigned int 460static unsigned int
459count_bits(long n) 461_ecore_x_count_bits(unsigned long n)
460{ 462{
461 unsigned int c; /* c accumulates the total bits set in v */ 463 unsigned int c; /* c accumulates the total bits set in v */
462 for (c = 0; n; c++) n &= n - 1; /* clear the least significant bit set */ 464 for (c = 0; n; c++) n &= n - 1; /* clear the least significant bit set */
@@ -464,13 +466,13 @@ count_bits(long n)
464} 466}
465#endif 467#endif
466 468
469#ifdef ECORE_XI2
467void 470void
468_ecore_x_input_axis_handler(XEvent *xevent, XIDeviceInfo *dev) 471_ecore_x_input_axis_handler(XEvent *xevent, XIDeviceInfo *dev)
469{ 472{
470#ifdef ECORE_XI2
471 if (xevent->type != GenericEvent) return; 473 if (xevent->type != GenericEvent) return;
472 XIDeviceEvent *evd = (XIDeviceEvent *)(xevent->xcookie.data); 474 XIDeviceEvent *evd = (XIDeviceEvent *)(xevent->xcookie.data);
473 int n = count_bits(*evd->valuators.mask); 475 unsigned int n = _ecore_x_count_bits(*evd->valuators.mask);
474 int i; 476 int i;
475 int j = 0; 477 int j = 0;
476 double tiltx = 0, tilty = 0; 478 double tiltx = 0, tilty = 0;
@@ -573,8 +575,8 @@ _ecore_x_input_axis_handler(XEvent *xevent, XIDeviceInfo *dev)
573 _ecore_x_axis_update(evd->child ? evd->child : evd->event, 575 _ecore_x_axis_update(evd->child ? evd->child : evd->event,
574 evd->event, evd->root, evd->time, evd->deviceid, 576 evd->event, evd->root, evd->time, evd->deviceid,
575 evd->detail, n, axis); 577 evd->detail, n, axis);
576#endif /* ifdef ECORE_XI2 */
577} 578}
579#endif /* ifdef ECORE_XI2 */
578 580
579#ifdef ECORE_XI2 581#ifdef ECORE_XI2
580static XIDeviceInfo * 582static XIDeviceInfo *