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/Workspace.cpp | 42 ++---------------------------------------- 1 file changed, 2 insertions(+), 40 deletions(-) (limited to 'src/helpers/Workspace.cpp') diff --git a/src/helpers/Workspace.cpp b/src/helpers/Workspace.cpp index 09149ec8..eed42925 100644 --- a/src/helpers/Workspace.cpp +++ b/src/helpers/Workspace.cpp @@ -13,18 +13,6 @@ CWorkspace::CWorkspace(int monitorID, std::string name, bool special) { m_szName = name; m_bIsSpecialWorkspace = special; - if (!special) { - m_pWlrHandle = wlr_ext_workspace_handle_v1_create(PMONITOR->pWLRWorkspaceGroupHandle); - - // set geometry here cuz we can - wl_array_init(&m_wlrCoordinateArr); - *reinterpret_cast(wl_array_add(&m_wlrCoordinateArr, sizeof(int))) = (int)PMONITOR->vecPosition.x; - *reinterpret_cast(wl_array_add(&m_wlrCoordinateArr, sizeof(int))) = (int)PMONITOR->vecPosition.y; - wlr_ext_workspace_handle_v1_set_coordinates(m_pWlrHandle, &m_wlrCoordinateArr); - wlr_ext_workspace_handle_v1_set_hidden(m_pWlrHandle, false); - wlr_ext_workspace_handle_v1_set_urgent(m_pWlrHandle, false); - } - m_vRenderOffset.m_pWorkspace = this; m_vRenderOffset.create(AVARTYPE_VECTOR, special ? g_pConfigManager->getAnimationPropertyConfig("specialWorkspace") : g_pConfigManager->getAnimationPropertyConfig("workspaces"), nullptr, AVARDAMAGE_ENTIRE); @@ -45,12 +33,6 @@ CWorkspace::~CWorkspace() { Debug::log(LOG, "Destroying workspace ID %d", m_iID); - if (m_pWlrHandle) { - wlr_ext_workspace_handle_v1_set_active(m_pWlrHandle, false); - wlr_ext_workspace_handle_v1_destroy(m_pWlrHandle); - m_pWlrHandle = nullptr; - } - g_pEventManager->postEvent({"destroyworkspace", m_szName}); EMIT_HOOK_EVENT("destroyWorkspace", this); } @@ -149,31 +131,11 @@ void CWorkspace::startAnim(bool in, bool left, bool instant) { } void CWorkspace::setActive(bool on) { - if (m_pWlrHandle) { - wlr_ext_workspace_handle_v1_set_active(m_pWlrHandle, on); - } + ; // empty until https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/40 } void CWorkspace::moveToMonitor(const int& id) { - const auto PMONITOR = g_pCompositor->getMonitorFromID(id); - - if (!PMONITOR || m_bIsSpecialWorkspace) - return; - - wlr_ext_workspace_handle_v1_set_active(m_pWlrHandle, false); - wlr_ext_workspace_handle_v1_destroy(m_pWlrHandle); - - m_pWlrHandle = wlr_ext_workspace_handle_v1_create(PMONITOR->pWLRWorkspaceGroupHandle); - - // set geometry here cuz we can - wl_array_init(&m_wlrCoordinateArr); - *reinterpret_cast(wl_array_add(&m_wlrCoordinateArr, sizeof(int))) = (int)PMONITOR->vecPosition.x; - *reinterpret_cast(wl_array_add(&m_wlrCoordinateArr, sizeof(int))) = (int)PMONITOR->vecPosition.y; - wlr_ext_workspace_handle_v1_set_coordinates(m_pWlrHandle, &m_wlrCoordinateArr); - wlr_ext_workspace_handle_v1_set_hidden(m_pWlrHandle, false); - wlr_ext_workspace_handle_v1_set_urgent(m_pWlrHandle, false); - - wlr_ext_workspace_handle_v1_set_name(m_pWlrHandle, m_szName.c_str()); + ; // empty until https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/40 } CWindow* CWorkspace::getLastFocusedWindow() { -- cgit v1.2.3