mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
seat: refactor seat_focus_surface()
This commit is contained in:
parent
50bcfa00f3
commit
e400700a4a
4 changed files with 11 additions and 8 deletions
|
|
@ -38,7 +38,8 @@ unmanaged_handle_map(struct wl_listener *listener, void *data)
|
|||
unmanaged->ly = xsurface->y;
|
||||
|
||||
if (wlr_xwayland_or_surface_wants_focus(xsurface)) {
|
||||
seat_focus_surface(xsurface->surface);
|
||||
struct wlr_seat *seat = unmanaged->server->seat.seat;
|
||||
seat_focus_surface(seat, xsurface->surface);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -59,7 +60,8 @@ unmanaged_handle_unmap(struct wl_listener *listener, void *data)
|
|||
if (!wlr_xwayland_or_surface_wants_focus(prev)) {
|
||||
continue;
|
||||
}
|
||||
seat_focus_surface(prev->surface);
|
||||
struct wlr_seat *seat = unmanaged->server->seat.seat;
|
||||
seat_focus_surface(seat, prev->surface);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue