mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-04 22:22:00 -07:00
fix xwayland windows grabbing mouse when hidden
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user