seat: remove seat_focused_surface()

This commit is contained in:
Johan Malm 2020-10-07 21:49:58 +01:00
parent 7eb33334d2
commit 8e2b3ea89a
5 changed files with 6 additions and 12 deletions

View file

@ -52,7 +52,8 @@ unmanaged_handle_unmap(struct wl_listener *listener, void *data)
wl_list_remove(&unmanaged->link);
wl_list_remove(&unmanaged->commit.link);
if (seat_focused_surface() == xsurface->surface) {
struct wlr_seat *seat = unmanaged->server->seat.seat;
if (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) {
@ -60,7 +61,6 @@ unmanaged_handle_unmap(struct wl_listener *listener, void *data)
if (!wlr_xwayland_or_surface_wants_focus(prev)) {
continue;
}
struct wlr_seat *seat = unmanaged->server->seat.seat;
seat_focus_surface(seat, prev->surface);
return;
}