diff options
author | Simon Zeni <simon@bl4ckb0ne.ca> | 2022-03-09 16:50:20 -0500 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2022-03-17 21:52:59 +0300 |
commit | 440d0bc22d57b8b0b21a8acbf127243b8d08cfae (patch) | |
tree | b7988cd9caef571636f775a78c8e39f95b610d0a /sway/input/cursor.c | |
parent | sway/input/seat: take output name from specialized input device (diff) | |
download | sway-440d0bc22d57b8b0b21a8acbf127243b8d08cfae.tar.gz sway-440d0bc22d57b8b0b21a8acbf127243b8d08cfae.tar.zst sway-440d0bc22d57b8b0b21a8acbf127243b8d08cfae.zip |
sway/input: follow up wlroots input device events renaming
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r-- | sway/input/cursor.c | 118 |
1 files changed, 61 insertions, 57 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index 4f7bf133..0b2f03a2 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c | |||
@@ -386,28 +386,29 @@ static void pointer_motion(struct sway_cursor *cursor, uint32_t time_msec, | |||
386 | static void handle_pointer_motion_relative( | 386 | static void handle_pointer_motion_relative( |
387 | struct wl_listener *listener, void *data) { | 387 | struct wl_listener *listener, void *data) { |
388 | struct sway_cursor *cursor = wl_container_of(listener, cursor, motion); | 388 | struct sway_cursor *cursor = wl_container_of(listener, cursor, motion); |
389 | struct wlr_event_pointer_motion *e = data; | 389 | struct wlr_pointer_motion_event *e = data; |
390 | cursor_handle_activity_from_device(cursor, e->device); | 390 | cursor_handle_activity_from_device(cursor, &e->pointer->base); |
391 | 391 | ||
392 | pointer_motion(cursor, e->time_msec, e->device, e->delta_x, e->delta_y, | 392 | pointer_motion(cursor, e->time_msec, &e->pointer->base, e->delta_x, |
393 | e->unaccel_dx, e->unaccel_dy); | 393 | e->delta_y, e->unaccel_dx, e->unaccel_dy); |
394 | } | 394 | } |
395 | 395 | ||
396 | static void handle_pointer_motion_absolute( | 396 | static void handle_pointer_motion_absolute( |
397 | struct wl_listener *listener, void *data) { | 397 | struct wl_listener *listener, void *data) { |
398 | struct sway_cursor *cursor = | 398 | struct sway_cursor *cursor = |
399 | wl_container_of(listener, cursor, motion_absolute); | 399 | wl_container_of(listener, cursor, motion_absolute); |
400 | struct wlr_event_pointer_motion_absolute *event = data; | 400 | struct wlr_pointer_motion_absolute_event *event = data; |
401 | cursor_handle_activity_from_device(cursor, event->device); | 401 | cursor_handle_activity_from_device(cursor, &event->pointer->base); |
402 | 402 | ||
403 | double lx, ly; | 403 | double lx, ly; |
404 | wlr_cursor_absolute_to_layout_coords(cursor->cursor, event->device, | 404 | wlr_cursor_absolute_to_layout_coords(cursor->cursor, &event->pointer->base, |
405 | event->x, event->y, &lx, &ly); | 405 | event->x, event->y, &lx, &ly); |
406 | 406 | ||
407 | double dx = lx - cursor->cursor->x; | 407 | double dx = lx - cursor->cursor->x; |
408 | double dy = ly - cursor->cursor->y; | 408 | double dy = ly - cursor->cursor->y; |
409 | 409 | ||
410 | pointer_motion(cursor, event->time_msec, event->device, dx, dy, dx, dy); | 410 | pointer_motion(cursor, event->time_msec, &event->pointer->base, dx, dy, |
411 | dx, dy); | ||
411 | } | 412 | } |
412 | 413 | ||
413 | void dispatch_cursor_button(struct sway_cursor *cursor, | 414 | void dispatch_cursor_button(struct sway_cursor *cursor, |
@@ -422,7 +423,7 @@ void dispatch_cursor_button(struct sway_cursor *cursor, | |||
422 | 423 | ||
423 | static void handle_pointer_button(struct wl_listener *listener, void *data) { | 424 | static void handle_pointer_button(struct wl_listener *listener, void *data) { |
424 | struct sway_cursor *cursor = wl_container_of(listener, cursor, button); | 425 | struct sway_cursor *cursor = wl_container_of(listener, cursor, button); |
425 | struct wlr_event_pointer_button *event = data; | 426 | struct wlr_pointer_button_event *event = data; |
426 | 427 | ||
427 | if (event->state == WLR_BUTTON_PRESSED) { | 428 | if (event->state == WLR_BUTTON_PRESSED) { |
428 | cursor->pressed_button_count++; | 429 | cursor->pressed_button_count++; |
@@ -434,20 +435,20 @@ static void handle_pointer_button(struct wl_listener *listener, void *data) { | |||
434 | } | 435 | } |
435 | } | 436 | } |
436 | 437 | ||
437 | cursor_handle_activity_from_device(cursor, event->device); | 438 | cursor_handle_activity_from_device(cursor, &event->pointer->base); |
438 | dispatch_cursor_button(cursor, event->device, | 439 | dispatch_cursor_button(cursor, &event->pointer->base, |
439 | event->time_msec, event->button, event->state); | 440 | event->time_msec, event->button, event->state); |
440 | } | 441 | } |
441 | 442 | ||
442 | void dispatch_cursor_axis(struct sway_cursor *cursor, | 443 | void dispatch_cursor_axis(struct sway_cursor *cursor, |
443 | struct wlr_event_pointer_axis *event) { | 444 | struct wlr_pointer_axis_event *event) { |
444 | seatop_pointer_axis(cursor->seat, event); | 445 | seatop_pointer_axis(cursor->seat, event); |
445 | } | 446 | } |
446 | 447 | ||
447 | static void handle_pointer_axis(struct wl_listener *listener, void *data) { | 448 | static void handle_pointer_axis(struct wl_listener *listener, void *data) { |
448 | struct sway_cursor *cursor = wl_container_of(listener, cursor, axis); | 449 | struct sway_cursor *cursor = wl_container_of(listener, cursor, axis); |
449 | struct wlr_event_pointer_axis *event = data; | 450 | struct wlr_pointer_axis_event *event = data; |
450 | cursor_handle_activity_from_device(cursor, event->device); | 451 | cursor_handle_activity_from_device(cursor, &event->pointer->base); |
451 | dispatch_cursor_axis(cursor, event); | 452 | dispatch_cursor_axis(cursor, event); |
452 | } | 453 | } |
453 | 454 | ||
@@ -458,8 +459,8 @@ static void handle_pointer_frame(struct wl_listener *listener, void *data) { | |||
458 | 459 | ||
459 | static void handle_touch_down(struct wl_listener *listener, void *data) { | 460 | static void handle_touch_down(struct wl_listener *listener, void *data) { |
460 | struct sway_cursor *cursor = wl_container_of(listener, cursor, touch_down); | 461 | struct sway_cursor *cursor = wl_container_of(listener, cursor, touch_down); |
461 | struct wlr_event_touch_down *event = data; | 462 | struct wlr_touch_down_event *event = data; |
462 | cursor_handle_activity_from_device(cursor, event->device); | 463 | cursor_handle_activity_from_device(cursor, &event->touch->base); |
463 | cursor_hide(cursor); | 464 | cursor_hide(cursor); |
464 | 465 | ||
465 | struct sway_seat *seat = cursor->seat; | 466 | struct sway_seat *seat = cursor->seat; |
@@ -467,7 +468,7 @@ static void handle_touch_down(struct wl_listener *listener, void *data) { | |||
467 | struct wlr_surface *surface = NULL; | 468 | struct wlr_surface *surface = NULL; |
468 | 469 | ||
469 | double lx, ly; | 470 | double lx, ly; |
470 | wlr_cursor_absolute_to_layout_coords(cursor->cursor, event->device, | 471 | wlr_cursor_absolute_to_layout_coords(cursor->cursor, &event->touch->base, |
471 | event->x, event->y, &lx, &ly); | 472 | event->x, event->y, &lx, &ly); |
472 | double sx, sy; | 473 | double sx, sy; |
473 | struct sway_node *focused_node = node_at_coords(seat, lx, ly, &surface, &sx, &sy); | 474 | struct sway_node *focused_node = node_at_coords(seat, lx, ly, &surface, &sx, &sy); |
@@ -495,24 +496,25 @@ static void handle_touch_down(struct wl_listener *listener, void *data) { | |||
495 | double dx, dy; | 496 | double dx, dy; |
496 | dx = lx - cursor->cursor->x; | 497 | dx = lx - cursor->cursor->x; |
497 | dy = ly - cursor->cursor->y; | 498 | dy = ly - cursor->cursor->y; |
498 | pointer_motion(cursor, event->time_msec, event->device, dx, dy, dx, dy); | 499 | pointer_motion(cursor, event->time_msec, &event->touch->base, dx, dy, |
499 | dispatch_cursor_button(cursor, event->device, event->time_msec, | 500 | dx, dy); |
501 | dispatch_cursor_button(cursor, &event->touch->base, event->time_msec, | ||
500 | BTN_LEFT, WLR_BUTTON_PRESSED); | 502 | BTN_LEFT, WLR_BUTTON_PRESSED); |
501 | } | 503 | } |
502 | } | 504 | } |
503 | 505 | ||
504 | static void handle_touch_up(struct wl_listener *listener, void *data) { | 506 | static void handle_touch_up(struct wl_listener *listener, void *data) { |
505 | struct sway_cursor *cursor = wl_container_of(listener, cursor, touch_up); | 507 | struct sway_cursor *cursor = wl_container_of(listener, cursor, touch_up); |
506 | struct wlr_event_touch_up *event = data; | 508 | struct wlr_touch_up_event *event = data; |
507 | cursor_handle_activity_from_device(cursor, event->device); | 509 | cursor_handle_activity_from_device(cursor, &event->touch->base); |
508 | 510 | ||
509 | struct wlr_seat *wlr_seat = cursor->seat->wlr_seat; | 511 | struct wlr_seat *wlr_seat = cursor->seat->wlr_seat; |
510 | 512 | ||
511 | if (cursor->simulating_pointer_from_touch) { | 513 | if (cursor->simulating_pointer_from_touch) { |
512 | if (cursor->pointer_touch_id == cursor->seat->touch_id) { | 514 | if (cursor->pointer_touch_id == cursor->seat->touch_id) { |
513 | cursor->pointer_touch_up = true; | 515 | cursor->pointer_touch_up = true; |
514 | dispatch_cursor_button(cursor, event->device, event->time_msec, | 516 | dispatch_cursor_button(cursor, &event->touch->base, |
515 | BTN_LEFT, WLR_BUTTON_RELEASED); | 517 | event->time_msec, BTN_LEFT, WLR_BUTTON_RELEASED); |
516 | } | 518 | } |
517 | } else { | 519 | } else { |
518 | wlr_seat_touch_notify_up(wlr_seat, event->time_msec, event->touch_id); | 520 | wlr_seat_touch_notify_up(wlr_seat, event->time_msec, event->touch_id); |
@@ -522,15 +524,15 @@ static void handle_touch_up(struct wl_listener *listener, void *data) { | |||
522 | static void handle_touch_motion(struct wl_listener *listener, void *data) { | 524 | static void handle_touch_motion(struct wl_listener *listener, void *data) { |
523 | struct sway_cursor *cursor = | 525 | struct sway_cursor *cursor = |
524 | wl_container_of(listener, cursor, touch_motion); | 526 | wl_container_of(listener, cursor, touch_motion); |
525 | struct wlr_event_touch_motion *event = data; | 527 | struct wlr_touch_motion_event *event = data; |
526 | cursor_handle_activity_from_device(cursor, event->device); | 528 | cursor_handle_activity_from_device(cursor, &event->touch->base); |
527 | 529 | ||
528 | struct sway_seat *seat = cursor->seat; | 530 | struct sway_seat *seat = cursor->seat; |
529 | struct wlr_seat *wlr_seat = seat->wlr_seat; | 531 | struct wlr_seat *wlr_seat = seat->wlr_seat; |
530 | struct wlr_surface *surface = NULL; | 532 | struct wlr_surface *surface = NULL; |
531 | 533 | ||
532 | double lx, ly; | 534 | double lx, ly; |
533 | wlr_cursor_absolute_to_layout_coords(cursor->cursor, event->device, | 535 | wlr_cursor_absolute_to_layout_coords(cursor->cursor, &event->touch->base, |
534 | event->x, event->y, &lx, &ly); | 536 | event->x, event->y, &lx, &ly); |
535 | double sx, sy; | 537 | double sx, sy; |
536 | node_at_coords(cursor->seat, lx, ly, &surface, &sx, &sy); | 538 | node_at_coords(cursor->seat, lx, ly, &surface, &sx, &sy); |
@@ -552,7 +554,8 @@ static void handle_touch_motion(struct wl_listener *listener, void *data) { | |||
552 | double dx, dy; | 554 | double dx, dy; |
553 | dx = lx - cursor->cursor->x; | 555 | dx = lx - cursor->cursor->x; |
554 | dy = ly - cursor->cursor->y; | 556 | dy = ly - cursor->cursor->y; |
555 | pointer_motion(cursor, event->time_msec, event->device, dx, dy, dx, dy); | 557 | pointer_motion(cursor, event->time_msec, &event->touch->base, |
558 | dx, dy, dx, dy); | ||
556 | } | 559 | } |
557 | } else if (surface) { | 560 | } else if (surface) { |
558 | wlr_seat_touch_notify_motion(wlr_seat, event->time_msec, | 561 | wlr_seat_touch_notify_motion(wlr_seat, event->time_msec, |
@@ -661,8 +664,8 @@ static void handle_tablet_tool_position(struct sway_cursor *cursor, | |||
661 | 664 | ||
662 | static void handle_tool_axis(struct wl_listener *listener, void *data) { | 665 | static void handle_tool_axis(struct wl_listener *listener, void *data) { |
663 | struct sway_cursor *cursor = wl_container_of(listener, cursor, tool_axis); | 666 | struct sway_cursor *cursor = wl_container_of(listener, cursor, tool_axis); |
664 | struct wlr_event_tablet_tool_axis *event = data; | 667 | struct wlr_tablet_tool_axis_event *event = data; |
665 | cursor_handle_activity_from_device(cursor, event->device); | 668 | cursor_handle_activity_from_device(cursor, &event->tablet->base); |
666 | 669 | ||
667 | struct sway_tablet_tool *sway_tool = event->tool->data; | 670 | struct sway_tablet_tool *sway_tool = event->tool->data; |
668 | if (!sway_tool) { | 671 | if (!sway_tool) { |
@@ -717,8 +720,8 @@ static void handle_tool_axis(struct wl_listener *listener, void *data) { | |||
717 | 720 | ||
718 | static void handle_tool_tip(struct wl_listener *listener, void *data) { | 721 | static void handle_tool_tip(struct wl_listener *listener, void *data) { |
719 | struct sway_cursor *cursor = wl_container_of(listener, cursor, tool_tip); | 722 | struct sway_cursor *cursor = wl_container_of(listener, cursor, tool_tip); |
720 | struct wlr_event_tablet_tool_tip *event = data; | 723 | struct wlr_tablet_tool_tip_event *event = data; |
721 | cursor_handle_activity_from_device(cursor, event->device); | 724 | cursor_handle_activity_from_device(cursor, &event->tablet->base); |
722 | 725 | ||
723 | struct sway_tablet_tool *sway_tool = event->tool->data; | 726 | struct sway_tablet_tool *sway_tool = event->tool->data; |
724 | struct wlr_tablet_v2_tablet *tablet_v2 = sway_tool->tablet->tablet_v2; | 727 | struct wlr_tablet_v2_tablet *tablet_v2 = sway_tool->tablet->tablet_v2; |
@@ -733,7 +736,7 @@ static void handle_tool_tip(struct wl_listener *listener, void *data) { | |||
733 | if (cursor->simulating_pointer_from_tool_tip && | 736 | if (cursor->simulating_pointer_from_tool_tip && |
734 | event->state == WLR_TABLET_TOOL_TIP_UP) { | 737 | event->state == WLR_TABLET_TOOL_TIP_UP) { |
735 | cursor->simulating_pointer_from_tool_tip = false; | 738 | cursor->simulating_pointer_from_tool_tip = false; |
736 | dispatch_cursor_button(cursor, event->device, event->time_msec, | 739 | dispatch_cursor_button(cursor, &event->tablet->base, event->time_msec, |
737 | BTN_LEFT, WLR_BUTTON_RELEASED); | 740 | BTN_LEFT, WLR_BUTTON_RELEASED); |
738 | wlr_seat_pointer_notify_frame(cursor->seat->wlr_seat); | 741 | wlr_seat_pointer_notify_frame(cursor->seat->wlr_seat); |
739 | } else if (!surface || !wlr_surface_accepts_tablet_v2(tablet_v2, surface)) { | 742 | } else if (!surface || !wlr_surface_accepts_tablet_v2(tablet_v2, surface)) { |
@@ -745,8 +748,8 @@ static void handle_tool_tip(struct wl_listener *listener, void *data) { | |||
745 | WLR_TABLET_TOOL_TIP_UP); | 748 | WLR_TABLET_TOOL_TIP_UP); |
746 | } else { | 749 | } else { |
747 | cursor->simulating_pointer_from_tool_tip = true; | 750 | cursor->simulating_pointer_from_tool_tip = true; |
748 | dispatch_cursor_button(cursor, event->device, event->time_msec, | 751 | dispatch_cursor_button(cursor, &event->tablet->base, |
749 | BTN_LEFT, WLR_BUTTON_PRESSED); | 752 | event->time_msec, BTN_LEFT, WLR_BUTTON_PRESSED); |
750 | wlr_seat_pointer_notify_frame(cursor->seat->wlr_seat); | 753 | wlr_seat_pointer_notify_frame(cursor->seat->wlr_seat); |
751 | } | 754 | } |
752 | } else { | 755 | } else { |
@@ -768,12 +771,13 @@ static struct sway_tablet *get_tablet_for_device(struct sway_cursor *cursor, | |||
768 | static void handle_tool_proximity(struct wl_listener *listener, void *data) { | 771 | static void handle_tool_proximity(struct wl_listener *listener, void *data) { |
769 | struct sway_cursor *cursor = | 772 | struct sway_cursor *cursor = |
770 | wl_container_of(listener, cursor, tool_proximity); | 773 | wl_container_of(listener, cursor, tool_proximity); |
771 | struct wlr_event_tablet_tool_proximity *event = data; | 774 | struct wlr_tablet_tool_proximity_event *event = data; |
772 | cursor_handle_activity_from_device(cursor, event->device); | 775 | cursor_handle_activity_from_device(cursor, &event->tablet->base); |
773 | 776 | ||
774 | struct wlr_tablet_tool *tool = event->tool; | 777 | struct wlr_tablet_tool *tool = event->tool; |
775 | if (!tool->data) { | 778 | if (!tool->data) { |
776 | struct sway_tablet *tablet = get_tablet_for_device(cursor, event->device); | 779 | struct sway_tablet *tablet = get_tablet_for_device(cursor, |
780 | &event->tablet->base); | ||
777 | if (!tablet) { | 781 | if (!tablet) { |
778 | sway_log(SWAY_ERROR, "no tablet for tablet tool"); | 782 | sway_log(SWAY_ERROR, "no tablet for tablet tool"); |
779 | return; | 783 | return; |
@@ -798,8 +802,8 @@ static void handle_tool_proximity(struct wl_listener *listener, void *data) { | |||
798 | 802 | ||
799 | static void handle_tool_button(struct wl_listener *listener, void *data) { | 803 | static void handle_tool_button(struct wl_listener *listener, void *data) { |
800 | struct sway_cursor *cursor = wl_container_of(listener, cursor, tool_button); | 804 | struct sway_cursor *cursor = wl_container_of(listener, cursor, tool_button); |
801 | struct wlr_event_tablet_tool_button *event = data; | 805 | struct wlr_tablet_tool_button_event *event = data; |
802 | cursor_handle_activity_from_device(cursor, event->device); | 806 | cursor_handle_activity_from_device(cursor, &event->tablet->base); |
803 | 807 | ||
804 | struct sway_tablet_tool *sway_tool = event->tool->data; | 808 | struct sway_tablet_tool *sway_tool = event->tool->data; |
805 | if (!sway_tool) { | 809 | if (!sway_tool) { |
@@ -820,14 +824,14 @@ static void handle_tool_button(struct wl_listener *listener, void *data) { | |||
820 | switch (event->state) { | 824 | switch (event->state) { |
821 | case WLR_BUTTON_PRESSED: | 825 | case WLR_BUTTON_PRESSED: |
822 | if (cursor->tool_buttons == 0) { | 826 | if (cursor->tool_buttons == 0) { |
823 | dispatch_cursor_button(cursor, event->device, | 827 | dispatch_cursor_button(cursor, &event->tablet->base, |
824 | event->time_msec, BTN_RIGHT, event->state); | 828 | event->time_msec, BTN_RIGHT, event->state); |
825 | } | 829 | } |
826 | cursor->tool_buttons++; | 830 | cursor->tool_buttons++; |
827 | break; | 831 | break; |
828 | case WLR_BUTTON_RELEASED: | 832 | case WLR_BUTTON_RELEASED: |
829 | if (cursor->tool_buttons == 1) { | 833 | if (cursor->tool_buttons == 1) { |
830 | dispatch_cursor_button(cursor, event->device, | 834 | dispatch_cursor_button(cursor, &event->tablet->base, |
831 | event->time_msec, BTN_RIGHT, event->state); | 835 | event->time_msec, BTN_RIGHT, event->state); |
832 | } | 836 | } |
833 | cursor->tool_buttons--; | 837 | cursor->tool_buttons--; |
@@ -927,8 +931,8 @@ static void handle_request_pointer_set_cursor(struct wl_listener *listener, | |||
927 | static void handle_pointer_pinch_begin(struct wl_listener *listener, void *data) { | 931 | static void handle_pointer_pinch_begin(struct wl_listener *listener, void *data) { |
928 | struct sway_cursor *cursor = wl_container_of( | 932 | struct sway_cursor *cursor = wl_container_of( |
929 | listener, cursor, pinch_begin); | 933 | listener, cursor, pinch_begin); |
930 | struct wlr_event_pointer_pinch_begin *event = data; | 934 | struct wlr_pointer_pinch_begin_event *event = data; |
931 | cursor_handle_activity_from_device(cursor, event->device); | 935 | cursor_handle_activity_from_device(cursor, &event->pointer->base); |
932 | wlr_pointer_gestures_v1_send_pinch_begin( | 936 | wlr_pointer_gestures_v1_send_pinch_begin( |
933 | cursor->pointer_gestures, cursor->seat->wlr_seat, | 937 | cursor->pointer_gestures, cursor->seat->wlr_seat, |
934 | event->time_msec, event->fingers); | 938 | event->time_msec, event->fingers); |
@@ -937,8 +941,8 @@ static void handle_pointer_pinch_begin(struct wl_listener *listener, void *data) | |||
937 | static void handle_pointer_pinch_update(struct wl_listener *listener, void *data) { | 941 | static void handle_pointer_pinch_update(struct wl_listener *listener, void *data) { |
938 | struct sway_cursor *cursor = wl_container_of( | 942 | struct sway_cursor *cursor = wl_container_of( |
939 | listener, cursor, pinch_update); | 943 | listener, cursor, pinch_update); |
940 | struct wlr_event_pointer_pinch_update *event = data; | 944 | struct wlr_pointer_pinch_update_event *event = data; |
941 | cursor_handle_activity_from_device(cursor, event->device); | 945 | cursor_handle_activity_from_device(cursor, &event->pointer->base); |
942 | wlr_pointer_gestures_v1_send_pinch_update( | 946 | wlr_pointer_gestures_v1_send_pinch_update( |
943 | cursor->pointer_gestures, cursor->seat->wlr_seat, | 947 | cursor->pointer_gestures, cursor->seat->wlr_seat, |
944 | event->time_msec, event->dx, event->dy, | 948 | event->time_msec, event->dx, event->dy, |
@@ -948,8 +952,8 @@ static void handle_pointer_pinch_update(struct wl_listener *listener, void *data | |||
948 | static void handle_pointer_pinch_end(struct wl_listener *listener, void *data) { | 952 | static void handle_pointer_pinch_end(struct wl_listener *listener, void *data) { |
949 | struct sway_cursor *cursor = wl_container_of( | 953 | struct sway_cursor *cursor = wl_container_of( |
950 | listener, cursor, pinch_end); | 954 | listener, cursor, pinch_end); |
951 | struct wlr_event_pointer_pinch_end *event = data; | 955 | struct wlr_pointer_pinch_end_event *event = data; |
952 | cursor_handle_activity_from_device(cursor, event->device); | 956 | cursor_handle_activity_from_device(cursor, &event->pointer->base); |
953 | wlr_pointer_gestures_v1_send_pinch_end( | 957 | wlr_pointer_gestures_v1_send_pinch_end( |
954 | cursor->pointer_gestures, cursor->seat->wlr_seat, | 958 | cursor->pointer_gestures, cursor->seat->wlr_seat, |
955 | event->time_msec, event->cancelled); | 959 | event->time_msec, event->cancelled); |
@@ -958,8 +962,8 @@ static void handle_pointer_pinch_end(struct wl_listener *listener, void *data) { | |||
958 | static void handle_pointer_swipe_begin(struct wl_listener *listener, void *data) { | 962 | static void handle_pointer_swipe_begin(struct wl_listener *listener, void *data) { |
959 | struct sway_cursor *cursor = wl_container_of( | 963 | struct sway_cursor *cursor = wl_container_of( |
960 | listener, cursor, swipe_begin); | 964 | listener, cursor, swipe_begin); |
961 | struct wlr_event_pointer_swipe_begin *event = data; | 965 | struct wlr_pointer_swipe_begin_event *event = data; |
962 | cursor_handle_activity_from_device(cursor, event->device); | 966 | cursor_handle_activity_from_device(cursor, &event->pointer->base); |
963 | wlr_pointer_gestures_v1_send_swipe_begin( | 967 | wlr_pointer_gestures_v1_send_swipe_begin( |
964 | cursor->pointer_gestures, cursor->seat->wlr_seat, | 968 | cursor->pointer_gestures, cursor->seat->wlr_seat, |
965 | event->time_msec, event->fingers); | 969 | event->time_msec, event->fingers); |
@@ -968,8 +972,8 @@ static void handle_pointer_swipe_begin(struct wl_listener *listener, void *data) | |||
968 | static void handle_pointer_swipe_update(struct wl_listener *listener, void *data) { | 972 | static void handle_pointer_swipe_update(struct wl_listener *listener, void *data) { |
969 | struct sway_cursor *cursor = wl_container_of( | 973 | struct sway_cursor *cursor = wl_container_of( |
970 | listener, cursor, swipe_update); | 974 | listener, cursor, swipe_update); |
971 | struct wlr_event_pointer_swipe_update *event = data; | 975 | struct wlr_pointer_swipe_update_event *event = data; |
972 | cursor_handle_activity_from_device(cursor, event->device); | 976 | cursor_handle_activity_from_device(cursor, &event->pointer->base); |
973 | wlr_pointer_gestures_v1_send_swipe_update( | 977 | wlr_pointer_gestures_v1_send_swipe_update( |
974 | cursor->pointer_gestures, cursor->seat->wlr_seat, | 978 | cursor->pointer_gestures, cursor->seat->wlr_seat, |
975 | event->time_msec, event->dx, event->dy); | 979 | event->time_msec, event->dx, event->dy); |
@@ -978,8 +982,8 @@ static void handle_pointer_swipe_update(struct wl_listener *listener, void *data | |||
978 | static void handle_pointer_swipe_end(struct wl_listener *listener, void *data) { | 982 | static void handle_pointer_swipe_end(struct wl_listener *listener, void *data) { |
979 | struct sway_cursor *cursor = wl_container_of( | 983 | struct sway_cursor *cursor = wl_container_of( |
980 | listener, cursor, swipe_end); | 984 | listener, cursor, swipe_end); |
981 | struct wlr_event_pointer_swipe_end *event = data; | 985 | struct wlr_pointer_swipe_end_event *event = data; |
982 | cursor_handle_activity_from_device(cursor, event->device); | 986 | cursor_handle_activity_from_device(cursor, &event->pointer->base); |
983 | wlr_pointer_gestures_v1_send_swipe_end( | 987 | wlr_pointer_gestures_v1_send_swipe_end( |
984 | cursor->pointer_gestures, cursor->seat->wlr_seat, | 988 | cursor->pointer_gestures, cursor->seat->wlr_seat, |
985 | event->time_msec, event->cancelled); | 989 | event->time_msec, event->cancelled); |
@@ -988,8 +992,8 @@ static void handle_pointer_swipe_end(struct wl_listener *listener, void *data) { | |||
988 | static void handle_pointer_hold_begin(struct wl_listener *listener, void *data) { | 992 | static void handle_pointer_hold_begin(struct wl_listener *listener, void *data) { |
989 | struct sway_cursor *cursor = wl_container_of( | 993 | struct sway_cursor *cursor = wl_container_of( |
990 | listener, cursor, hold_begin); | 994 | listener, cursor, hold_begin); |
991 | struct wlr_event_pointer_hold_begin *event = data; | 995 | struct wlr_pointer_hold_begin_event *event = data; |
992 | cursor_handle_activity_from_device(cursor, event->device); | 996 | cursor_handle_activity_from_device(cursor, &event->pointer->base); |
993 | wlr_pointer_gestures_v1_send_hold_begin( | 997 | wlr_pointer_gestures_v1_send_hold_begin( |
994 | cursor->pointer_gestures, cursor->seat->wlr_seat, | 998 | cursor->pointer_gestures, cursor->seat->wlr_seat, |
995 | event->time_msec, event->fingers); | 999 | event->time_msec, event->fingers); |
@@ -998,8 +1002,8 @@ static void handle_pointer_hold_begin(struct wl_listener *listener, void *data) | |||
998 | static void handle_pointer_hold_end(struct wl_listener *listener, void *data) { | 1002 | static void handle_pointer_hold_end(struct wl_listener *listener, void *data) { |
999 | struct sway_cursor *cursor = wl_container_of( | 1003 | struct sway_cursor *cursor = wl_container_of( |
1000 | listener, cursor, hold_end); | 1004 | listener, cursor, hold_end); |
1001 | struct wlr_event_pointer_hold_end *event = data; | 1005 | struct wlr_pointer_hold_end_event *event = data; |
1002 | cursor_handle_activity_from_device(cursor, event->device); | 1006 | cursor_handle_activity_from_device(cursor, &event->pointer->base); |
1003 | wlr_pointer_gestures_v1_send_hold_end( | 1007 | wlr_pointer_gestures_v1_send_hold_end( |
1004 | cursor->pointer_gestures, cursor->seat->wlr_seat, | 1008 | cursor->pointer_gestures, cursor->seat->wlr_seat, |
1005 | event->time_msec, event->cancelled); | 1009 | event->time_msec, event->cancelled); |