fix xwayland windows grabbing mouse when hidden

This commit is contained in:
vaxerski
2022-03-20 19:14:17 +01:00
parent f3d703335d
commit 23ec4793e1
5 changed files with 40 additions and 3 deletions

View File

@@ -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));
}
}
}