seat: refactor seat_focus_surface()

This commit is contained in:
Johan Malm 2020-10-08 20:22:52 +01:00
parent f752610e0b
commit 9342b2b414
4 changed files with 10 additions and 14 deletions

View file

@ -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) {