From bb0933437f4602080a66cc877fee36dce8dcb3ff Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 1 Sep 2023 17:10:03 +0200 Subject: wlr-ext-workspace: remove protocol impl Various reasons: 1st, memory issues. 2nd, MR got closed (see https://gitlab.freedesktop.org/wlroots/wlr-protocols/-/merge_requests/35) 3rd, not needed anymore (waybar has its own hyprland/workspaces module) --- src/helpers/Monitor.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'src/helpers/Monitor.cpp') diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index d82005e3..5b30e351 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -145,13 +145,6 @@ void CMonitor::onConnect(bool noRule) { Debug::log(LOG, "Added new monitor with name %s at %i,%i with size %ix%i, pointer %lx", output->name, (int)vecPosition.x, (int)vecPosition.y, (int)vecPixelSize.x, (int)vecPixelSize.y, output); - // add a WLR workspace group - if (!pWLRWorkspaceGroupHandle) { - pWLRWorkspaceGroupHandle = wlr_ext_workspace_group_handle_v1_create(g_pCompositor->m_sWLREXTWorkspaceMgr); - } - - wlr_ext_workspace_group_handle_v1_output_enter(pWLRWorkspaceGroupHandle, output); - setupDefaultWS(monitorRule); for (auto& ws : g_pCompositor->m_vWorkspaces) { @@ -392,15 +385,11 @@ void CMonitor::setupDefaultWS(const SMonitorRule& monitorRule) { PNEWWORKSPACE = g_pCompositor->m_vWorkspaces.emplace_back(std::make_unique(ID, newDefaultWorkspaceName)).get(); - // We are required to set the name here immediately - wlr_ext_workspace_handle_v1_set_name(PNEWWORKSPACE->m_pWlrHandle, newDefaultWorkspaceName.c_str()); - PNEWWORKSPACE->m_iID = WORKSPACEID; } activeWorkspace = PNEWWORKSPACE->m_iID; - g_pCompositor->deactivateAllWLRWorkspaces(PNEWWORKSPACE->m_pWlrHandle); PNEWWORKSPACE->setActive(true); PNEWWORKSPACE->m_szLastMonitor = ""; } @@ -527,14 +516,6 @@ void CMonitor::changeWorkspace(CWorkspace* const pWorkspace, bool internal) { return; } - if (pWorkspace->m_iID == activeWorkspace) { - // in some cases (e.g. workspace from one monitor to another) - // we need to send this - g_pCompositor->deactivateAllWLRWorkspaces(pWorkspace->m_pWlrHandle); - pWorkspace->setActive(true); - return; - } - const auto POLDWORKSPACE = g_pCompositor->getWorkspaceByID(activeWorkspace); activeWorkspace = pWorkspace->m_iID; @@ -574,9 +555,6 @@ void CMonitor::changeWorkspace(CWorkspace* const pWorkspace, bool internal) { g_pLayoutManager->getCurrentLayout()->recalculateMonitor(ID); - // set some flags and fire event - g_pCompositor->deactivateAllWLRWorkspaces(pWorkspace->m_pWlrHandle); - pWorkspace->setActive(true); g_pEventManager->postEvent(SHyprIPCEvent{"workspace", pWorkspace->m_szName}); EMIT_HOOK_EVENT("workspace", pWorkspace); } -- cgit v1.2.3