Bug Description
When changing window focus using the mouse by clicking a window, Rift's layout engine selection does not update to match the active window.
Consequently, when a layout mutation shortcut is triggered (such as MoveNode, SwapWindows, or PromoteToMaster), the layout command operates on the last window focused via keyboard shortcuts, rather than the window currently focused by the mouse.
Steps to Reproduce
This works the best with the stack-layout since here it's obvious which window is holding the focus
- Focus Window A using a keyboard shortcut (e.g.
FocusWindow).
- Move the mouse to Window B and click it. Window B is now physically focused and active.
- Press a layout movement shortcut (e.g.,
MoveNode or SwapWindows).
- Observe: Window A (the last keyboard-focused window) is moved instead of Window B. In some configurations, focus may also forcibly snap back to Window A.
Desired Solution
- Synchronize Selection on Focus Change: Ensure that any change in window focus (including mouse clicks and hover events) immediately updates the layout engine's selection state (
select_window in the active workspace tree).
- Robust Target Resolution: When executing a layout command, the layout engine should verify and resolve the target window using the actual active window or the window physically under the cursor, keeping the focus and layout state in sync.
Bug Description
When changing window focus using the mouse by clicking a window, Rift's layout engine selection does not update to match the active window.
Consequently, when a layout mutation shortcut is triggered (such as
MoveNode,SwapWindows, orPromoteToMaster), the layout command operates on the last window focused via keyboard shortcuts, rather than the window currently focused by the mouse.Steps to Reproduce
This works the best with the stack-layout since here it's obvious which window is holding the focus
FocusWindow).MoveNodeorSwapWindows).Desired Solution
select_windowin the active workspace tree).