mirror of
https://github.com/swaywm/sway.git
synced 2024-11-11 13:04:11 +01:00
seatop_default: handle focus for unmanaged xwayland windows last
Fixes #4707
This commit is contained in:
parent
f576bcdb8c
commit
37afbc4dbc
@ -295,21 +295,6 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_XWAYLAND
|
|
||||||
// Handle clicking on xwayland unmanaged view
|
|
||||||
if (surface && wlr_surface_is_xwayland_surface(surface)) {
|
|
||||||
struct wlr_xwayland_surface *xsurface =
|
|
||||||
wlr_xwayland_surface_from_wlr_surface(surface);
|
|
||||||
if (wlr_xwayland_or_surface_wants_focus(xsurface)) {
|
|
||||||
struct wlr_xwayland *xwayland = server.xwayland.wlr_xwayland;
|
|
||||||
wlr_xwayland_set_seat(xwayland, seat->wlr_seat);
|
|
||||||
seat_set_focus_surface(seat, xsurface->surface, false);
|
|
||||||
}
|
|
||||||
seat_pointer_notify_button(seat, time_msec, button, state);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Handle tiling resize via border
|
// Handle tiling resize via border
|
||||||
if (cont && resize_edge && button == BTN_LEFT &&
|
if (cont && resize_edge && button == BTN_LEFT &&
|
||||||
state == WLR_BUTTON_PRESSED && !is_floating) {
|
state == WLR_BUTTON_PRESSED && !is_floating) {
|
||||||
@ -426,6 +411,22 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if HAVE_XWAYLAND
|
||||||
|
// Handle clicking on xwayland unmanaged view
|
||||||
|
if (surface && wlr_surface_is_xwayland_surface(surface)) {
|
||||||
|
struct wlr_xwayland_surface *xsurface =
|
||||||
|
wlr_xwayland_surface_from_wlr_surface(surface);
|
||||||
|
if (xsurface->override_redirect &&
|
||||||
|
wlr_xwayland_or_surface_wants_focus(xsurface)) {
|
||||||
|
struct wlr_xwayland *xwayland = server.xwayland.wlr_xwayland;
|
||||||
|
wlr_xwayland_set_seat(xwayland, seat->wlr_seat);
|
||||||
|
seat_set_focus_surface(seat, xsurface->surface, false);
|
||||||
|
seat_pointer_notify_button(seat, time_msec, button, state);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
seat_pointer_notify_button(seat, time_msec, button, state);
|
seat_pointer_notify_button(seat, time_msec, button, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user