mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 13:45:59 +01:00
fix focus history on workspace jumps
This commit is contained in:
parent
5814d9b2a0
commit
434719611d
1 changed files with 7 additions and 1 deletions
|
@ -808,8 +808,14 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) {
|
|||
if (pWindow->m_bPinned)
|
||||
pWindow->m_iWorkspaceID = m_pLastMonitor->activeWorkspace;
|
||||
|
||||
if (!isWorkspaceVisible(pWindow->m_iWorkspaceID))
|
||||
if (!isWorkspaceVisible(pWindow->m_iWorkspaceID)) {
|
||||
// This is to fix incorrect feedback on the focus history.
|
||||
const auto PWORKSPACE = getWorkspaceByID(pWindow->m_iWorkspaceID);
|
||||
PWORKSPACE->m_pLastFocusedWindow = pWindow;
|
||||
g_pKeybindManager->changeworkspace("[internal]" + std::to_string(pWindow->m_iWorkspaceID));
|
||||
// changeworkspace already calls focusWindow
|
||||
return;
|
||||
}
|
||||
|
||||
const auto PLASTWINDOW = m_pLastWindow;
|
||||
m_pLastWindow = pWindow;
|
||||
|
|
Loading…
Reference in a new issue