mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
seat: refactor seat_focus_surface()
This commit is contained in:
parent
f752610e0b
commit
9342b2b414
4 changed files with 10 additions and 14 deletions
|
|
@ -38,8 +38,7 @@ unmanaged_handle_map(struct wl_listener *listener, void *data)
|
|||
unmanaged->ly = xsurface->y;
|
||||
|
||||
if (wlr_xwayland_or_surface_wants_focus(xsurface)) {
|
||||
struct wlr_seat *seat = unmanaged->server->seat.seat;
|
||||
seat_focus_surface(seat, xsurface->surface);
|
||||
seat_focus_surface(&unmanaged->server->seat, xsurface->surface);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -52,8 +51,8 @@ unmanaged_handle_unmap(struct wl_listener *listener, void *data)
|
|||
wl_list_remove(&unmanaged->link);
|
||||
wl_list_remove(&unmanaged->commit.link);
|
||||
|
||||
struct wlr_seat *seat = unmanaged->server->seat.seat;
|
||||
if (seat->keyboard_state.focused_surface == xsurface->surface) {
|
||||
struct seat *seat = &unmanaged->server->seat;
|
||||
if (seat->seat->keyboard_state.focused_surface == xsurface->surface) {
|
||||
struct xwayland_unmanaged *u;
|
||||
struct wl_list *list = &unmanaged->server->unmanaged_surfaces;
|
||||
wl_list_for_each (u, list, link) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue