mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
cursor: don't un-minimize previewed window while window switching
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.
This commit is contained in:
parent
fa6bffa6c6
commit
a8cb8aad30
1 changed files with 6 additions and 1 deletions
|
|
@ -641,10 +641,15 @@ _cursor_update_focus(struct server *server)
|
|||
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue