mirror of
https://github.com/hyprwm/Hyprland.git
synced 2024-12-29 18:53:19 +03:00
fix focus history on workspace jumps
This commit is contained in:
parent
5814d9b2a0
commit
434719611d
@ -808,8 +808,14 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) {
|
|||||||
if (pWindow->m_bPinned)
|
if (pWindow->m_bPinned)
|
||||||
pWindow->m_iWorkspaceID = m_pLastMonitor->activeWorkspace;
|
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));
|
g_pKeybindManager->changeworkspace("[internal]" + std::to_string(pWindow->m_iWorkspaceID));
|
||||||
|
// changeworkspace already calls focusWindow
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const auto PLASTWINDOW = m_pLastWindow;
|
const auto PLASTWINDOW = m_pLastWindow;
|
||||||
m_pLastWindow = pWindow;
|
m_pLastWindow = pWindow;
|
||||||
|
Loading…
Reference in New Issue
Block a user