mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-07 23:45:58 +01:00
pass through pinch events
This commit is contained in:
parent
5c836e6460
commit
ef24329495
3 changed files with 25 additions and 3 deletions
|
@ -174,6 +174,9 @@ void CCompositor::initAllSignals() {
|
||||||
addWLSignal(&m_sWLRCursor->events.swipe_begin, &Events::listen_swipeBegin, m_sWLRCursor, "WLRCursor");
|
addWLSignal(&m_sWLRCursor->events.swipe_begin, &Events::listen_swipeBegin, m_sWLRCursor, "WLRCursor");
|
||||||
addWLSignal(&m_sWLRCursor->events.swipe_update, &Events::listen_swipeUpdate, m_sWLRCursor, "WLRCursor");
|
addWLSignal(&m_sWLRCursor->events.swipe_update, &Events::listen_swipeUpdate, m_sWLRCursor, "WLRCursor");
|
||||||
addWLSignal(&m_sWLRCursor->events.swipe_end, &Events::listen_swipeEnd, m_sWLRCursor, "WLRCursor");
|
addWLSignal(&m_sWLRCursor->events.swipe_end, &Events::listen_swipeEnd, m_sWLRCursor, "WLRCursor");
|
||||||
|
addWLSignal(&m_sWLRCursor->events.pinch_begin, &Events::listen_pinchBegin, m_sWLRCursor, "WLRCursor");
|
||||||
|
addWLSignal(&m_sWLRCursor->events.pinch_update, &Events::listen_pinchUpdate, m_sWLRCursor, "WLRCursor");
|
||||||
|
addWLSignal(&m_sWLRCursor->events.pinch_end, &Events::listen_pinchEnd, m_sWLRCursor, "WLRCursor");
|
||||||
addWLSignal(&m_sWLRBackend->events.new_input, &Events::listen_newInput, m_sWLRBackend, "Backend");
|
addWLSignal(&m_sWLRBackend->events.new_input, &Events::listen_newInput, m_sWLRBackend, "Backend");
|
||||||
addWLSignal(&m_sSeat.seat->events.request_set_cursor, &Events::listen_requestMouse, &m_sSeat, "Seat");
|
addWLSignal(&m_sSeat.seat->events.request_set_cursor, &Events::listen_requestMouse, &m_sSeat, "Seat");
|
||||||
addWLSignal(&m_sSeat.seat->events.request_set_selection, &Events::listen_requestSetSel, &m_sSeat, "Seat");
|
addWLSignal(&m_sSeat.seat->events.request_set_selection, &Events::listen_requestSetSel, &m_sSeat, "Seat");
|
||||||
|
|
|
@ -177,3 +177,18 @@ void Events::listener_swipeEnd(wl_listener* listener, void* data) {
|
||||||
|
|
||||||
g_pInputManager->onSwipeEnd(EVENT);
|
g_pInputManager->onSwipeEnd(EVENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Events::listener_pinchBegin(wl_listener* listener, void* data) {
|
||||||
|
const auto EV = (wlr_pointer_pinch_begin_event*)data;
|
||||||
|
wlr_pointer_gestures_v1_send_pinch_begin(g_pCompositor->m_sWLRPointerGestures, g_pCompositor->m_sSeat.seat, EV->time_msec, EV->fingers);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Events::listener_pinchUpdate(wl_listener* listener, void* data) {
|
||||||
|
const auto EV = (wlr_pointer_pinch_update_event*)data;
|
||||||
|
wlr_pointer_gestures_v1_send_pinch_update(g_pCompositor->m_sWLRPointerGestures, g_pCompositor->m_sSeat.seat, EV->time_msec, EV->dx, EV->dy, EV->scale, EV->rotation);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Events::listener_pinchEnd(wl_listener* listener, void* data) {
|
||||||
|
const auto EV = (wlr_pointer_pinch_end_event*)data;
|
||||||
|
wlr_pointer_gestures_v1_send_pinch_end(g_pCompositor->m_sWLRPointerGestures, g_pCompositor->m_sSeat.seat, EV->time_msec, EV->cancelled);
|
||||||
|
}
|
|
@ -120,10 +120,14 @@ namespace Events {
|
||||||
|
|
||||||
LISTENER(newIdleInhibitor);
|
LISTENER(newIdleInhibitor);
|
||||||
|
|
||||||
|
// session
|
||||||
|
LISTENER(sessionActive);
|
||||||
|
|
||||||
|
// Touchpad shit
|
||||||
LISTENER(swipeBegin);
|
LISTENER(swipeBegin);
|
||||||
LISTENER(swipeEnd);
|
LISTENER(swipeEnd);
|
||||||
LISTENER(swipeUpdate);
|
LISTENER(swipeUpdate);
|
||||||
|
LISTENER(pinchBegin);
|
||||||
// session
|
LISTENER(pinchUpdate);
|
||||||
LISTENER(sessionActive);
|
LISTENER(pinchEnd);
|
||||||
};
|
};
|
Loading…
Reference in a new issue