Hyprland
Hyprland copied to clipboard
fix:wrong workspace name when focus on a named special workspace
Describe your PR, what does it fix/add?
fix wrong workspace name when focus on a named special workspace,see the issue
Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)
#4556
Is it ready for merging, or does it need work?
i am not good at cpp,so i am not sure substr is a good idea,but i think m_szName need to be fixed when tooglespecialworkspace
emm...how about that
or maybe add a prefixid:,so you can pass m_iID directly to to togglespecialworkspace function?
Easier to use the function directly
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp
index 9126f936..75d92194 100644
--- a/src/helpers/Monitor.cpp
+++ b/src/helpers/Monitor.cpp
@@ -539,7 +539,7 @@ void CMonitor::changeWorkspace(CWorkspace* const pWorkspace, bool internal, bool
if (pWorkspace->m_bIsSpecialWorkspace) {
if (specialWorkspaceID != pWorkspace->m_iID) {
Debug::log(LOG, "changeworkspace on special, togglespecialworkspace to id {}", pWorkspace->m_iID);
- g_pKeybindManager->m_mDispatchers["togglespecialworkspace"](pWorkspace->m_szName == "special" ? "" : pWorkspace->m_szName);
+ setSpecialWorkspace(pWorkspace);
}
return;
}