mirror of
https://github.com/swaywm/sway.git
synced 2025-11-15 06:59:50 -05:00
Give keyboard focus to unmanaged xwayland surfaces
This fixes dmenu
This commit is contained in:
parent
a5d06b6e2b
commit
2b357af7ee
4 changed files with 58 additions and 36 deletions
|
|
@ -59,6 +59,13 @@ static void unmanaged_handle_map(struct wl_listener *listener, void *data) {
|
|||
surface->ly = xsurface->y;
|
||||
desktop_damage_surface(xsurface->surface, surface->lx, surface->ly, true);
|
||||
|
||||
if (!wlr_xwayland_surface_is_unmanaged(xsurface)) {
|
||||
struct sway_seat *seat = input_manager_current_seat(input_manager);
|
||||
struct wlr_xwayland *xwayland = seat->input->server->xwayland;
|
||||
wlr_xwayland_set_seat(xwayland, seat->wlr_seat);
|
||||
seat_set_focus_surface(seat, xsurface->surface);
|
||||
}
|
||||
|
||||
// TODO: we don't send surface enter/leave events to xwayland unmanaged
|
||||
// surfaces, but xwayland doesn't support HiDPI anyway
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue