From 4b796d30c190e14aa39a9540395523cee27bd348 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Thu, 7 Jul 2022 11:52:12 +0200 Subject: Added swipe workspace gestures --- src/Compositor.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/Compositor.cpp') diff --git a/src/Compositor.cpp b/src/Compositor.cpp index a8a3116a..52a873d7 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -123,6 +123,8 @@ CCompositor::CCompositor() { wlr_xdg_foreign_v1_create(m_sWLDisplay, m_sWLRForeignRegistry); wlr_xdg_foreign_v2_create(m_sWLDisplay, m_sWLRForeignRegistry); + + m_sWLRPointerGestures = wlr_pointer_gestures_v1_create(m_sWLDisplay); } CCompositor::~CCompositor() { @@ -142,6 +144,9 @@ void CCompositor::initAllSignals() { addWLSignal(&m_sWLRCursor->events.button, &Events::listen_mouseButton, m_sWLRCursor, "WLRCursor"); addWLSignal(&m_sWLRCursor->events.axis, &Events::listen_mouseAxis, m_sWLRCursor, "WLRCursor"); addWLSignal(&m_sWLRCursor->events.frame, &Events::listen_mouseFrame, 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_end, &Events::listen_swipeEnd, m_sWLRCursor, "WLRCursor"); 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_selection, &Events::listen_requestSetSel, &m_sSeat, "Seat"); @@ -1204,4 +1209,13 @@ CWindow* CCompositor::getX11Parent(CWindow* pWindow) { } return nullptr; -} \ No newline at end of file +} + +void CCompositor::updateWorkspaceWindowDecos(const int& id) { + for (auto& w : m_vWindows) { + if (w->m_iWorkspaceID != id) + continue; + + w->updateWindowDecos(); + } +} -- cgit v1.2.3