mirror of
https://github.com/labwc/labwc.git
synced 2025-11-05 13:29:58 -05:00
seat: use focus_change event to update focused/active view
- Connect to wlr_seat_keyboard_state's focus_change event. - Add view_from_wlr_surface(), which does what the name says. - Use focus_change event along with view_from_wlr_surface() to update server->focused_view and set SSD states via view_set_activated(). - Eliminate desktop_focused_view() since server->focused_view should be reliably up-to-date now. - Eliminate view_focus/defocus() since we can now just call seat_focus_surface() directly.
This commit is contained in:
parent
bb5d272dc9
commit
4028a9482f
9 changed files with 77 additions and 100 deletions
|
|
@ -94,7 +94,7 @@ handle_keybinding(struct server *server, uint32_t modifiers, xkb_keysym_t sym, x
|
|||
continue;
|
||||
}
|
||||
if (server->seat.nr_inhibited_keybind_views
|
||||
&& view_inhibits_keybinds(desktop_focused_view(server))
|
||||
&& view_inhibits_keybinds(server->focused_view)
|
||||
&& !actions_contain_toggle_keybinds(&keybind->actions)) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue