]> git.mdlowis.com Git - proto/labwc.git/commit
seat: use focus_change event to update focused/active view
authorJohn Lindgren <john@jlindgren.net>
Wed, 27 Sep 2023 22:24:35 +0000 (18:24 -0400)
committerJohan Malm <johanmalm@users.noreply.github.com>
Thu, 28 Sep 2023 21:52:30 +0000 (22:52 +0100)
commit4028a9482f9399e3c3587f5c6eca6c0b128c9afc
treef9d36e6591cb9c5c3f8722097ce5e961946d0b7c
parentbb5d272dc98b25f05bc21375df3b55a99734dfb0
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.
include/labwc.h
include/view.h
src/action.c
src/cursor.c
src/desktop.c
src/keyboard.c
src/seat.c
src/view.c
src/workspaces.c