diff options
-rw-r--r-- | sway/input/seatop_default.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sway/input/seatop_default.c b/sway/input/seatop_default.c index 088ba545..46d9a657 100644 --- a/sway/input/seatop_default.c +++ b/sway/input/seatop_default.c | |||
@@ -7,6 +7,9 @@ | |||
7 | #include "sway/input/seat.h" | 7 | #include "sway/input/seat.h" |
8 | #include "sway/tree/view.h" | 8 | #include "sway/tree/view.h" |
9 | #include "log.h" | 9 | #include "log.h" |
10 | #if HAVE_XWAYLAND | ||
11 | #include "sway/xwayland.h" | ||
12 | #endif | ||
10 | 13 | ||
11 | struct seatop_default_event { | 14 | struct seatop_default_event { |
12 | struct sway_node *previous_node; | 15 | struct sway_node *previous_node; |
@@ -292,6 +295,21 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec, | |||
292 | return; | 295 | return; |
293 | } | 296 | } |
294 | 297 | ||
298 | #if HAVE_XWAYLAND | ||
299 | // Handle clicking on xwayland unmanaged view | ||
300 | if (surface && wlr_surface_is_xwayland_surface(surface)) { | ||
301 | struct wlr_xwayland_surface *xsurface = | ||
302 | wlr_xwayland_surface_from_wlr_surface(surface); | ||
303 | if (wlr_xwayland_or_surface_wants_focus(xsurface)) { | ||
304 | struct wlr_xwayland *xwayland = server.xwayland.wlr_xwayland; | ||
305 | wlr_xwayland_set_seat(xwayland, seat->wlr_seat); | ||
306 | seat_set_focus_surface(seat, xsurface->surface, false); | ||
307 | } | ||
308 | seat_pointer_notify_button(seat, time_msec, button, state); | ||
309 | return; | ||
310 | } | ||
311 | #endif | ||
312 | |||
295 | // Handle tiling resize via border | 313 | // Handle tiling resize via border |
296 | if (cont && resize_edge && button == BTN_LEFT && | 314 | if (cont && resize_edge && button == BTN_LEFT && |
297 | state == WLR_BUTTON_PRESSED && !is_floating) { | 315 | state == WLR_BUTTON_PRESSED && !is_floating) { |