add a focus history vec
This commit is contained in:
parent
6f3548b184
commit
fb2679d5ef
3 changed files with 14 additions and 0 deletions
|
|
@ -865,6 +865,14 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) {
|
|||
}
|
||||
|
||||
g_pInputManager->recheckIdleInhibitorStatus();
|
||||
|
||||
// move to front of the window history
|
||||
const auto HISTORYPIVOT = std::find_if(m_vWindowFocusHistory.begin(), m_vWindowFocusHistory.end(), [&](const auto& other) { return other == pWindow; });
|
||||
if (HISTORYPIVOT == m_vWindowFocusHistory.end()) {
|
||||
Debug::log(ERR, "BUG THIS: Window %x has no pivot in history", pWindow);
|
||||
} else {
|
||||
std::rotate(m_vWindowFocusHistory.begin(), HISTORYPIVOT, HISTORYPIVOT + 1);
|
||||
}
|
||||
}
|
||||
|
||||
void CCompositor::focusSurface(wlr_surface* pSurface, CWindow* pWindowOwner) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue