Fix MRU tracking when overview is open #2900
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes MRU focus window tracking when the overview is open. The issue was that Alt+Tab would work once, but subsequent presses wouldn't switch back to the previous window.
The root cause is that MRU timestamps were updated based on keyboard focus changes, but when the overview is open, keyboard focus stays on the overview even though layout focus changes (via arrow keys, MRU advances, or opening new windows).
The fix adds a
previous_layout_focus_idfield to track layout focus separately from keyboard focus. On each refresh cycle, if the layout focus changed, the MRU timestamp is updated for the newly focused window.Fixes: #2834
Fixes: #2839