This commit restores the check removed in
7a6ecca.
Without the check, if followMouse="yes" and
followMouseRequiresMovement="no", osd_update() => cursor_update_focus() =>
desktop_focus_view() unexpectedly un-minimizes the window on cursor even
when the window is just a preview of window switcher. This caused some
strange behavior that a minimized window selected with window switcher is
immediately hidden after finishing window switching.
struct cursor_context ctx = get_cursor_context(server);
if ((ctx.view || ctx.surface) && rc.focus_follow_mouse
- && !rc.focus_follow_mouse_requires_movement) {
+ && !rc.focus_follow_mouse_requires_movement
+ && server->input_mode
+ != LAB_INPUT_STATE_WINDOW_SWITCHER) {
/*
* Always focus the surface below the cursor when
* followMouse=yes and followMouseRequiresMovement=no.
+ *
+ * We should ignore them while window-switching though, because
+ * calling desktop_focus_view() un-minimizes previewed window.
*/
desktop_focus_view_or_surface(&server->seat, ctx.view,
ctx.surface, rc.raise_on_focus);