mirror of
https://github.com/labwc/labwc.git
synced 2026-02-08 10:06:59 -05:00
cycle: fix spurious focus changes on finishing window switcher
As described in the `FIXME` comment in `cycle.c`, we had spurious focus changes where the keyboard focus is momentarily given to the previously focused window when finishing the window switcher, an then it is given to the selected window. This commit fixes this by adding a parameter in `seat_focus_override_end()` to avoid restoring the focus to the previously focused window. I also removed the check for `!seat->seat->keyboard_state.focused_surface` in `seat_focus_override_end()`. I thought it was necessary to avoid updating the keyboard focus if the focus was given to a session-lock surface before e.g. finishing window switching, but `seat_focus()` is no-op in that case anyway.
This commit is contained in:
parent
a62441ff77
commit
a57d8b026c
5 changed files with 12 additions and 11 deletions
|
|
@ -397,10 +397,10 @@ void seat_output_layout_changed(struct seat *seat);
|
|||
void seat_focus_override_begin(struct seat *seat, enum input_mode input_mode,
|
||||
enum lab_cursors cursor_shape);
|
||||
/*
|
||||
* Restore the pointer/keyboard focus which was cleared in
|
||||
* seat_focus_override_begin().
|
||||
* If restore_focus=true, restore the pointer/keyboard focus which was cleared
|
||||
* in seat_focus_override_begin().
|
||||
*/
|
||||
void seat_focus_override_end(struct seat *seat);
|
||||
void seat_focus_override_end(struct seat *seat, bool restore_focus);
|
||||
|
||||
/**
|
||||
* interactive_anchor_to_cursor() - repositions the geometry to remain
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue