mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-07 12:05:59 +01:00
keybinds: Refocus only if the silently moved window had the focus (#4328)
This commit is contained in:
parent
bd3ea8dcb5
commit
3c33d4b9dd
1 changed files with 6 additions and 4 deletions
|
@ -1062,10 +1062,12 @@ void CKeybindManager::moveActiveToWorkspaceSilent(std::string args) {
|
||||||
g_pCompositor->moveWindowToWorkspaceSafe(PWINDOW, pWorkspace);
|
g_pCompositor->moveWindowToWorkspaceSafe(PWINDOW, pWorkspace);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (const auto PATCOORDS = g_pCompositor->vectorToWindowIdeal(OLDMIDDLE); PATCOORDS && PATCOORDS != PWINDOW)
|
if (PWINDOW == g_pCompositor->m_pLastWindow) {
|
||||||
g_pCompositor->focusWindow(PATCOORDS);
|
if (const auto PATCOORDS = g_pCompositor->vectorToWindowIdeal(OLDMIDDLE, PWINDOW); PATCOORDS)
|
||||||
else
|
g_pCompositor->focusWindow(PATCOORDS);
|
||||||
g_pInputManager->refocus();
|
else
|
||||||
|
g_pInputManager->refocus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CKeybindManager::moveFocusTo(std::string args) {
|
void CKeybindManager::moveFocusTo(std::string args) {
|
||||||
|
|
Loading…
Reference in a new issue