window->appears_focused can get stuck when focus follows mouse
Affected version
Mutter 44.3 Wayland
Bug summary
Active window visual indication gets stuck with specific interactions.
Steps to reproduce
- Set focus follows mouse to true
- Open 2 gnome-terminal windows
- On window A open a right-click menu
- Move the mouse over the popup menu to make it focused
- Move the mouse back to the parent WITHOUT clicking on the popup
- Dismiss the popup by left-clicking on the parent
- Move the mouse over window B
What happened
Window A doesn't lose its active visual indication. Inspector shows window->appears_focused is still true. It should be false.
What did you expect to happen
Inactive windows should be shown with inactive colors. The indication becomes unstuck, if another right-click popup is dismissed by clicking the menu, not the parent. This doesn't happen with click to focus setting.