summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-11-25 15:37:16 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-11-25 15:37:16 +0900
commit2b3b2409516319238f80a56c3aff5f33257ebf36 (patch)
treedae8ea13ccd453b490574c9e864b43307e30432a
parentb88718e6545313913c637cfb2c22cd821be452d9 (diff)
ecore-x - xi2 support - unbreak build break i added.
this only breaks when you enable xi2.2
-rw-r--r--src/lib/ecore_x/xlib/ecore_x_xi2.c131
1 files changed, 67 insertions, 64 deletions
diff --git a/src/lib/ecore_x/xlib/ecore_x_xi2.c b/src/lib/ecore_x/xlib/ecore_x_xi2.c
index d5139c7cc0..429473c40c 100644
--- a/src/lib/ecore_x/xlib/ecore_x_xi2.c
+++ b/src/lib/ecore_x/xlib/ecore_x_xi2.c
@@ -352,98 +352,101 @@ _ecore_x_input_multi_handler(XEvent *xevent)
352 int devid = evd->deviceid; 352 int devid = evd->deviceid;
353 353
354 switch (xevent->xcookie.evtype) 354 switch (xevent->xcookie.evtype)
355 { 355 {
356#ifdef XI_TouchUpdate 356#ifdef XI_TouchUpdate
357 case XI_TouchUpdate: 357 case XI_TouchUpdate:
358 {
358#ifdef ECORE_XI2_2 359#ifdef ECORE_XI2_2
359 i = _ecore_x_input_touch_index_get(devid, evd->detail, XI_TouchUpdate); 360 int i = _ecore_x_input_touch_index_get(devid, evd->detail, XI_TouchUpdate);
360 if ((i == 0) && (evd->flags & XITouchEmulatingPointer)) return; 361 if ((i == 0) && (evd->flags & XITouchEmulatingPointer)) return;
361#endif /* #ifdef ECORE_XI2_2 */ 362#endif /* #ifdef ECORE_XI2_2 */
362 INF("Handling XI_TouchUpdate"); 363 INF("Handling XI_TouchUpdate");
363 _ecore_mouse_move 364 _ecore_mouse_move(evd->time,
364 (evd->time, 365 0, // state
365 0, // state 366 evd->event_x, evd->event_y,
366 evd->event_x, evd->event_y, 367 evd->root_x, evd->root_y,
367 evd->root_x, evd->root_y, 368 evd->event,
368 evd->event, 369 (evd->child ? evd->child : evd->event),
369 (evd->child ? evd->child : evd->event), 370 evd->root,
370 evd->root, 371 1, // same_screen
371 1, // same_screen
372#ifdef ECORE_XI2_2 372#ifdef ECORE_XI2_2
373 i, 1, 1, 373 i, 1, 1,
374#else 374#else
375 devid, 1, 1, 375 devid, 1, 1,
376#endif /* #ifdef ECORE_XI2_2 */ 376#endif /* #ifdef ECORE_XI2_2 */
377 1.0, // pressure 377 1.0, // pressure
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 }
381 break; 382 break;
382#endif 383#endif
383 384
384#ifdef XI_TouchBegin 385#ifdef XI_TouchBegin
385 case XI_TouchBegin: 386 case XI_TouchBegin:
387 {
386#ifdef ECORE_XI2_2 388#ifdef ECORE_XI2_2
387 i = _ecore_x_input_touch_index_get(devid, evd->detail, XI_TouchBegin); 389 int i = _ecore_x_input_touch_index_get(devid, evd->detail, XI_TouchBegin);
388 if ((i == 0) && (evd->flags & XITouchEmulatingPointer)) return; 390 if ((i == 0) && (evd->flags & XITouchEmulatingPointer)) return;
389#endif /* #ifdef ECORE_XI2_2 */ 391#endif /* #ifdef ECORE_XI2_2 */
390 INF("Handling XI_TouchBegin"); 392 INF("Handling XI_TouchBegin");
391 _ecore_mouse_button 393 _ecore_mouse_button(ECORE_EVENT_MOUSE_BUTTON_DOWN,
392 (ECORE_EVENT_MOUSE_BUTTON_DOWN, 394 evd->time,
393 evd->time, 395 0, // state
394 0, // state 396 0, // button
395 0, // button 397 evd->event_x, evd->event_y,
396 evd->event_x, evd->event_y, 398 evd->root_x, evd->root_y,
397 evd->root_x, evd->root_y, 399 evd->event,
398 evd->event, 400 (evd->child ? evd->child : evd->event),
399 (evd->child ? evd->child : evd->event), 401 evd->root,
400 evd->root, 402 1, // same_screen
401 1, // same_screen
402#ifdef ECORE_XI2_2 403#ifdef ECORE_XI2_2
403 i, 1, 1, 404 i, 1, 1,
404#else 405#else
405 devid, 1, 1, 406 devid, 1, 1,
406#endif /* #ifdef ECORE_XI2_2 */ 407#endif /* #ifdef ECORE_XI2_2 */
407 1.0, // pressure 408 1.0, // pressure
408 0.0, // angle 409 0.0, // angle
409 evd->event_x, evd->event_y, 410 evd->event_x, evd->event_y,
410 evd->root_x, evd->root_y); 411 evd->root_x, evd->root_y);
412 }
411 break; 413 break;
412#endif 414#endif
413 415
414#ifdef XI_TouchEnd 416#ifdef XI_TouchEnd
415 case XI_TouchEnd: 417 case XI_TouchEnd:
416#ifdef ECORE_XI2_2
417 i = _ecore_x_input_touch_index_get(devid, evd->detail, XI_TouchEnd);
418 if ((i == 0) && (evd->flags & XITouchEmulatingPointer))
419 { 418 {
420 _ecore_x_input_touch_index_clear(devid, i); 419#ifdef ECORE_XI2_2
421 return; 420 int i = _ecore_x_input_touch_index_get(devid, evd->detail, XI_TouchEnd);
422 } 421 if ((i == 0) && (evd->flags & XITouchEmulatingPointer))
422 {
423 _ecore_x_input_touch_index_clear(devid, i);
424 return;
425 }
423#endif /* #ifdef ECORE_XI2_2 */ 426#endif /* #ifdef ECORE_XI2_2 */
424 INF("Handling XI_TouchEnd"); 427 INF("Handling XI_TouchEnd");
425 _ecore_mouse_button 428 _ecore_mouse_button(ECORE_EVENT_MOUSE_BUTTON_UP,
426 (ECORE_EVENT_MOUSE_BUTTON_UP, 429 evd->time,
427 evd->time, 430 0, // state
428 0, // state 431 0, // button
429 0, // button 432 evd->event_x, evd->event_y,
430 evd->event_x, evd->event_y, 433 evd->root_x, evd->root_y,
431 evd->root_x, evd->root_y, 434 evd->event,
432 evd->event, 435 (evd->child ? evd->child : evd->event),
433 (evd->child ? evd->child : evd->event), 436 evd->root,
434 evd->root, 437 1, // same_screen
435 1, // same_screen
436#ifdef ECORE_XI2_2 438#ifdef ECORE_XI2_2
437 i, 1, 1, 439 i, 1, 1,
438#else 440#else
439 devid, 1, 1, 441 devid, 1, 1,
440#endif /* #ifdef ECORE_XI2_2 */ 442#endif /* #ifdef ECORE_XI2_2 */
441 1.0, // pressure 443 1.0, // pressure
442 0.0, // angle 444 0.0, // angle
443 evd->event_x, evd->event_y, 445 evd->event_x, evd->event_y,
444 evd->root_x, evd->root_y); 446 evd->root_x, evd->root_y);
445#ifdef ECORE_XI2_2 447#ifdef ECORE_XI2_2
446 _ecore_x_input_touch_index_clear(devid, i); 448 _ecore_x_input_touch_index_clear(devid, i);
449 }
447#endif /* #ifdef ECORE_XI2_2 */ 450#endif /* #ifdef ECORE_XI2_2 */
448 break; 451 break;
449#endif 452#endif