summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-07-07 11:52:12 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-07-07 13:49:04 +0200
commit4b796d30c190e14aa39a9540395523cee27bd348 (patch)
tree3ad84df935c95aa18bbc47e80f290e1f38a8f365 /src/Compositor.cpp
parent1cf2f378d4a0e5e3da757d90404c2816a6765626 (diff)
Added swipe workspace gestures
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp16
1 files changed, 15 insertions, 1 deletions
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();
+ }
+}