mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-02 19:05:58 +01:00
workspace: Fix duplication of "special:" in special workspace name (#5729)
* Fix duplication of "special:" in special workspace name modified: src/desktop/Workspace.cpp * Track default special workspace name as special:special This is to fix the edge cases with the previous commit without breaking user configs. modified: src/helpers/MiscFunctions.cpp --------- Co-authored-by: Agent_00Ming <agent00ming9366@gmail.com>
This commit is contained in:
parent
e5fa0007a5
commit
81bb4eb2f6
2 changed files with 3 additions and 3 deletions
|
@ -207,7 +207,7 @@ void CWorkspace::rememberPrevWorkspace(const PHLWORKSPACE& prev) {
|
||||||
|
|
||||||
std::string CWorkspace::getConfigName() {
|
std::string CWorkspace::getConfigName() {
|
||||||
if (m_bIsSpecialWorkspace) {
|
if (m_bIsSpecialWorkspace) {
|
||||||
return "special:" + m_szName;
|
return m_szName;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_iID > 0)
|
if (m_iID > 0)
|
||||||
|
|
|
@ -256,7 +256,7 @@ bool isDirection(const char& arg) {
|
||||||
int getWorkspaceIDFromString(const std::string& in, std::string& outName) {
|
int getWorkspaceIDFromString(const std::string& in, std::string& outName) {
|
||||||
int result = WORKSPACE_INVALID;
|
int result = WORKSPACE_INVALID;
|
||||||
if (in.starts_with("special")) {
|
if (in.starts_with("special")) {
|
||||||
outName = "special";
|
outName = "special:special";
|
||||||
|
|
||||||
if (in.length() > 8) {
|
if (in.length() > 8) {
|
||||||
const auto NAME = in.substr(8);
|
const auto NAME = in.substr(8);
|
||||||
|
@ -833,4 +833,4 @@ bool envEnabled(const std::string& env) {
|
||||||
if (!ENV)
|
if (!ENV)
|
||||||
return false;
|
return false;
|
||||||
return std::string(ENV) == "1";
|
return std::string(ENV) == "1";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue