diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 6ddd7f90..f8ca7d91 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -848,31 +848,6 @@ CWindow* CCompositor::getFirstWindowOnWorkspace(const int& id) { return nullptr; } -void CCompositor::fixXWaylandWindowsOnWorkspace(const int& id) { - // not needed anymore - return; - - const auto ISVISIBLE = isWorkspaceVisible(id); - - const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(id); - - if (!PWORKSPACE) - return; - - for (auto& w : m_vWindows) { - 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 && (!PWORKSPACE->m_bHasFullscreenWindow || w->m_bIsFullscreen)) - g_pXWaylandManager->moveXWaylandWindow(w.get(), w->m_vRealPosition.vec()); - else - g_pXWaylandManager->moveXWaylandWindow(w.get(), Vector2D(42069,42069)); - } - } -} - bool CCompositor::doesSeatAcceptInput(wlr_surface* surface) { return !m_sSeat.exclusiveClient || (surface && m_sSeat.exclusiveClient == wl_resource_get_client(surface->resource)); } diff --git a/src/Compositor.hpp b/src/Compositor.hpp index f7a131ae..95879815 100644 --- a/src/Compositor.hpp +++ b/src/Compositor.hpp @@ -128,7 +128,6 @@ public: void updateWorkspaceWindowDecos(const int&); int getWindowsOnWorkspace(const int&); CWindow* getFirstWindowOnWorkspace(const int&); - void fixXWaylandWindowsOnWorkspace(const int&); CWindow* getFullscreenWindowOnWorkspace(const int&); bool doesSeatAcceptInput(wlr_surface*); bool isWindowActive(CWindow*); diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index 15388bf3..05f9e2d5 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -697,10 +697,6 @@ void CHyprDwindleLayout::fullscreenRequestForWindow(CWindow* pWindow, eFullscree g_pCompositor->moveWindowToTop(pWindow); - // we need to fix XWayland windows by sending them to NARNIA - // because otherwise they'd still be recieving mouse events - g_pCompositor->fixXWaylandWindowsOnWorkspace(PMONITOR->activeWorkspace); - recalculateMonitor(PMONITOR->ID); } diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp index c57d2b2d..47210059 100644 --- a/src/layout/IHyprLayout.cpp +++ b/src/layout/IHyprLayout.cpp @@ -87,7 +87,6 @@ void IHyprLayout::onWindowCreatedFloating(CWindow* pWindow) { if (pWindow->m_iX11Type != 2) { g_pXWaylandManager->setWindowSize(pWindow, pWindow->m_vRealSize.goalv()); - g_pCompositor->fixXWaylandWindowsOnWorkspace(PMONITOR->activeWorkspace); g_pCompositor->moveWindowToTop(pWindow); } diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp index 71c65125..c489e32e 100644 --- a/src/layout/MasterLayout.cpp +++ b/src/layout/MasterLayout.cpp @@ -389,10 +389,6 @@ void CHyprMasterLayout::fullscreenRequestForWindow(CWindow* pWindow, eFullscreen g_pCompositor->moveWindowToTop(pWindow); - // we need to fix XWayland windows by sending them to NARNIA - // because otherwise they'd still be recieving mouse events - g_pCompositor->fixXWaylandWindowsOnWorkspace(PMONITOR->activeWorkspace); - recalculateMonitor(PMONITOR->ID); } diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 425736ff..ed953ef1 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -488,13 +488,6 @@ void CKeybindManager::changeworkspace(std::string args) { else PMONITOR->specialWorkspaceOpen = true; - // we need to move XWayland windows to narnia or otherwise they will still process our cursor and shit - // and that'd be annoying as hell - g_pCompositor->fixXWaylandWindowsOnWorkspace(OLDWORKSPACEID); - - // and fix on the new workspace - g_pCompositor->fixXWaylandWindowsOnWorkspace(PMONITOR->activeWorkspace); - // here and only here begin anim. we don't want to anim visible workspaces on other monitors. // check if anim left or right const auto ANIMTOLEFT = workspaceToChangeTo > OLDWORKSPACEID; @@ -563,10 +556,6 @@ void CKeybindManager::changeworkspace(std::string args) { else PMONITOR->specialWorkspaceOpen = true; - // we need to move XWayland windows to narnia or otherwise they will still process our cursor and shit - // and that'd be annoying as hell - g_pCompositor->fixXWaylandWindowsOnWorkspace(OLDWORKSPACE); - // set active and deactivate all other g_pCompositor->deactivateAllWLRWorkspaces(PWORKSPACE->m_pWlrHandle); PWORKSPACE->setActive(true);