mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 21:05:59 +01:00
fix silent workspaces with back and forth
This commit is contained in:
parent
7b01c3d028
commit
0eb86f4b0d
1 changed files with 3 additions and 2 deletions
|
@ -551,7 +551,8 @@ void CKeybindManager::changeworkspace(std::string args) {
|
||||||
static auto *const PBACKANDFORTH = &g_pConfigManager->getConfigValuePtr("binds:workspace_back_and_forth")->intValue;
|
static auto *const PBACKANDFORTH = &g_pConfigManager->getConfigValuePtr("binds:workspace_back_and_forth")->intValue;
|
||||||
if (*PBACKANDFORTH
|
if (*PBACKANDFORTH
|
||||||
&& PCURRENTWORKSPACE->m_iID == workspaceToChangeTo
|
&& PCURRENTWORKSPACE->m_iID == workspaceToChangeTo
|
||||||
&& PCURRENTWORKSPACE->m_iPrevWorkspaceID != -1) {
|
&& PCURRENTWORKSPACE->m_iPrevWorkspaceID != -1
|
||||||
|
&& !internal) {
|
||||||
|
|
||||||
workspaceToChangeTo = PCURRENTWORKSPACE->m_iPrevWorkspaceID;
|
workspaceToChangeTo = PCURRENTWORKSPACE->m_iPrevWorkspaceID;
|
||||||
isSwitchingToPrevious = true;
|
isSwitchingToPrevious = true;
|
||||||
|
@ -576,7 +577,7 @@ void CKeybindManager::changeworkspace(std::string args) {
|
||||||
|
|
||||||
const auto PWORKSPACETOCHANGETO = g_pCompositor->getWorkspaceByID(workspaceToChangeTo);
|
const auto PWORKSPACETOCHANGETO = g_pCompositor->getWorkspaceByID(workspaceToChangeTo);
|
||||||
|
|
||||||
if (!isSwitchingToPrevious)
|
if (!isSwitchingToPrevious && !internal)
|
||||||
// Remember previous workspace.
|
// Remember previous workspace.
|
||||||
PWORKSPACETOCHANGETO->m_iPrevWorkspaceID = g_pCompositor->m_pLastMonitor->activeWorkspace;
|
PWORKSPACETOCHANGETO->m_iPrevWorkspaceID = g_pCompositor->m_pLastMonitor->activeWorkspace;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue