diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-09-01 17:10:03 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-09-01 17:10:03 +0200 |
| commit | bb0933437f4602080a66cc877fee36dce8dcb3ff (patch) | |
| tree | 95cd1e67eddc83f6d435c30418673833e264554c /src/helpers/Workspace.cpp | |
| parent | 5035f5fc682f3307e2130e10d5ba209495113edb (diff) | |
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)
Diffstat (limited to 'src/helpers/Workspace.cpp')
| -rw-r--r-- | src/helpers/Workspace.cpp | 42 |
1 files changed, 2 insertions, 40 deletions
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<int*>(wl_array_add(&m_wlrCoordinateArr, sizeof(int))) = (int)PMONITOR->vecPosition.x; - *reinterpret_cast<int*>(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<int*>(wl_array_add(&m_wlrCoordinateArr, sizeof(int))) = (int)PMONITOR->vecPosition.x; - *reinterpret_cast<int*>(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() { |
