mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-08 05:05:59 +01:00
Make movetoworkspace register previous workspace (#2436)
* Make movetoworkspace register previous workspace * style: no braces + format with clang-format
This commit is contained in:
parent
4ef684f615
commit
e4e6ddb075
1 changed files with 7 additions and 3 deletions
|
@ -881,9 +881,10 @@ void CKeybindManager::moveActiveToWorkspace(std::string args) {
|
|||
return;
|
||||
}
|
||||
|
||||
auto pWorkspace = g_pCompositor->getWorkspaceByID(WORKSPACEID);
|
||||
CMonitor* pMonitor = nullptr;
|
||||
const auto POLDWS = g_pCompositor->getWorkspaceByID(PWINDOW->m_iWorkspaceID);
|
||||
auto pWorkspace = g_pCompositor->getWorkspaceByID(WORKSPACEID);
|
||||
CMonitor* pMonitor = nullptr;
|
||||
const auto POLDWS = g_pCompositor->getWorkspaceByID(PWINDOW->m_iWorkspaceID);
|
||||
static auto* const PALLOWWORKSPACECYCLES = &g_pConfigManager->getConfigValuePtr("binds:allow_workspace_cycles")->intValue;
|
||||
|
||||
g_pHyprRenderer->damageWindow(PWINDOW);
|
||||
|
||||
|
@ -903,6 +904,9 @@ void CKeybindManager::moveActiveToWorkspace(std::string args) {
|
|||
|
||||
g_pCompositor->focusWindow(PWINDOW);
|
||||
g_pCompositor->warpCursorTo(PWINDOW->middle());
|
||||
|
||||
if (*PALLOWWORKSPACECYCLES)
|
||||
pWorkspace->m_sPrevWorkspace = {POLDWS->m_iID, POLDWS->m_szName};
|
||||
}
|
||||
|
||||
void CKeybindManager::moveActiveToWorkspaceSilent(std::string args) {
|
||||
|
|
Loading…
Reference in a new issue