mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 03:09:48 +01:00
change placement of isSwitchingToPrevious (#1388)
fixes #1218, but doesn't break functionality of allow_workspace_cycles.
This commit is contained in:
parent
589046ecf7
commit
6a56d1e4d0
1 changed files with 4 additions and 4 deletions
|
@ -669,13 +669,13 @@ void CKeybindManager::changeworkspace(std::string args) {
|
||||||
else
|
else
|
||||||
workspaceName = std::to_string(workspaceToChangeTo);
|
workspaceName = std::to_string(workspaceToChangeTo);
|
||||||
|
|
||||||
isSwitchingToPrevious = true;
|
|
||||||
|
|
||||||
// If the previous workspace ID isn't reset, cycles can form when continually going
|
// If the previous workspace ID isn't reset, cycles can form when continually going
|
||||||
// to the previous workspace again and again.
|
// to the previous workspace again and again.
|
||||||
static auto* const PALLOWWORKSPACECYCLES = &g_pConfigManager->getConfigValuePtr("binds:allow_workspace_cycles")->intValue;
|
static auto* const PALLOWWORKSPACECYCLES = &g_pConfigManager->getConfigValuePtr("binds:allow_workspace_cycles")->intValue;
|
||||||
if (!*PALLOWWORKSPACECYCLES)
|
if (!*PALLOWWORKSPACECYCLES)
|
||||||
PCURRENTWORKSPACE->m_iPrevWorkspaceID = -1;
|
PCURRENTWORKSPACE->m_iPrevWorkspaceID = -1;
|
||||||
|
else
|
||||||
|
isSwitchingToPrevious = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
workspaceToChangeTo = getWorkspaceIDFromString(args, workspaceName);
|
workspaceToChangeTo = getWorkspaceIDFromString(args, workspaceName);
|
||||||
|
@ -702,13 +702,13 @@ void CKeybindManager::changeworkspace(std::string args) {
|
||||||
else
|
else
|
||||||
workspaceName = std::to_string(workspaceToChangeTo);
|
workspaceName = std::to_string(workspaceToChangeTo);
|
||||||
|
|
||||||
isSwitchingToPrevious = true;
|
|
||||||
|
|
||||||
// If the previous workspace ID isn't reset, cycles can form when continually going
|
// If the previous workspace ID isn't reset, cycles can form when continually going
|
||||||
// to the previous workspace again and again.
|
// to the previous workspace again and again.
|
||||||
static auto* const PALLOWWORKSPACECYCLES = &g_pConfigManager->getConfigValuePtr("binds:allow_workspace_cycles")->intValue;
|
static auto* const PALLOWWORKSPACECYCLES = &g_pConfigManager->getConfigValuePtr("binds:allow_workspace_cycles")->intValue;
|
||||||
if (!*PALLOWWORKSPACECYCLES)
|
if (!*PALLOWWORKSPACECYCLES)
|
||||||
PCURRENTWORKSPACE->m_iPrevWorkspaceID = -1;
|
PCURRENTWORKSPACE->m_iPrevWorkspaceID = -1;
|
||||||
|
else
|
||||||
|
isSwitchingToPrevious = true;
|
||||||
|
|
||||||
} else if (PCURRENTWORKSPACE && PCURRENTWORKSPACE->m_iID == workspaceToChangeTo && !internal)
|
} else if (PCURRENTWORKSPACE && PCURRENTWORKSPACE->m_iID == workspaceToChangeTo && !internal)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue