summaryrefslogtreecommitdiff
path: root/src/helpers/Workspace.cpp
diff options
context:
space:
mode:
authorxDarksome <dev@darkso.me>2022-07-02 19:43:52 +0300
committerGitHub <noreply@github.com>2022-07-02 19:43:52 +0300
commit185c4d6ea13ad5f4483aa2e389e43bd09106002f (patch)
treea7bc4a9510c39e367317b5ce64d2ee0e0a72d4f0 /src/helpers/Workspace.cpp
parentfc4b10d13c14c4eb08febb0637f27177cb6a1940 (diff)
parentb7b3344188e3ebd2baed14bc288ee42a1ae8d6f2 (diff)
Merge branch 'hyprwm:main' into main
Diffstat (limited to 'src/helpers/Workspace.cpp')
-rw-r--r--src/helpers/Workspace.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/helpers/Workspace.cpp b/src/helpers/Workspace.cpp
index 90d234cb..7a6ad070 100644
--- a/src/helpers/Workspace.cpp
+++ b/src/helpers/Workspace.cpp
@@ -1,7 +1,7 @@
#include "Workspace.hpp"
#include "../Compositor.hpp"
-CWorkspace::CWorkspace(int monitorID, bool special) {
+CWorkspace::CWorkspace(int monitorID, std::string name, bool special) {
const auto PMONITOR = g_pCompositor->getMonitorFromID(monitorID);
if (!PMONITOR) {
@@ -10,7 +10,7 @@ CWorkspace::CWorkspace(int monitorID, bool special) {
}
m_iMonitorID = monitorID;
-
+ m_szName = name;
m_bIsSpecialWorkspace = special;
if (!special) {
@@ -30,6 +30,8 @@ CWorkspace::CWorkspace(int monitorID, bool special) {
m_fAlpha.m_pWorkspace = this;
m_fAlpha.create(AVARTYPE_FLOAT, &g_pConfigManager->getConfigValuePtr("animations:workspaces_speed")->floatValue, &g_pConfigManager->getConfigValuePtr("animations:workspaces")->intValue, &g_pConfigManager->getConfigValuePtr("animations:workspaces_curve")->strValue, nullptr, AVARDAMAGE_ENTIRE);
m_fAlpha.setValueAndWarp(255.f);
+
+ g_pEventManager->postEvent({"createworkspace", m_szName}, true);
}
CWorkspace::~CWorkspace() {
@@ -42,6 +44,8 @@ CWorkspace::~CWorkspace() {
wlr_ext_workspace_handle_v1_destroy(m_pWlrHandle);
m_pWlrHandle = nullptr;
}
+
+ g_pEventManager->postEvent({"destroyworkspace", m_szName}, true);
}
void CWorkspace::startAnim(bool in, bool left, bool instant) {