diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-20 19:14:17 +0100 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-20 19:14:17 +0100 |
| commit | 23ec4793e18949f32c4954b46ff2e724dc1e6f31 (patch) | |
| tree | 79c991a1d4a0b9aaeb3867c9c41d9eeb885be99c /src/Compositor.cpp | |
| parent | f3d703335db50269c37819cd36712dc7c2e674cf (diff) | |
fix xwayland windows grabbing mouse when hidden
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index d0b1f2e0..ca36cc5d 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -418,4 +418,21 @@ CWindow* CCompositor::getFirstWindowOnWorkspace(const int& id) { } return nullptr; +} + +void CCompositor::fixXWaylandWindowsOnWorkspace(const int& id) { + const auto ISVISIBLE = isWorkspaceVisible(id); + + for (auto& w : m_lWindows) { + if (w.m_iWorkspaceID == id) { + + // moveXWaylandWindow only moves XWayland windows + // so there is no need to check here + // if the window is XWayland or not. + if (ISVISIBLE) + g_pXWaylandManager->moveXWaylandWindow(&w, w.m_vRealPosition); + else + g_pXWaylandManager->moveXWaylandWindow(&w, Vector2D(42069,42069)); + } + } }
\ No newline at end of file |
