aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seatop_default.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input/seatop_default.c')
-rw-r--r--sway/input/seatop_default.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/sway/input/seatop_default.c b/sway/input/seatop_default.c
index 46d9a657..3768bc63 100644
--- a/sway/input/seatop_default.c
+++ b/sway/input/seatop_default.c
@@ -295,21 +295,6 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec,
295 return; 295 return;
296 } 296 }
297 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
313 // Handle tiling resize via border 298 // Handle tiling resize via border
314 if (cont && resize_edge && button == BTN_LEFT && 299 if (cont && resize_edge && button == BTN_LEFT &&
315 state == WLR_BUTTON_PRESSED && !is_floating) { 300 state == WLR_BUTTON_PRESSED && !is_floating) {
@@ -426,6 +411,22 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec,
426 return; 411 return;
427 } 412 }
428 413
414#if HAVE_XWAYLAND
415 // Handle clicking on xwayland unmanaged view
416 if (surface && wlr_surface_is_xwayland_surface(surface)) {
417 struct wlr_xwayland_surface *xsurface =
418 wlr_xwayland_surface_from_wlr_surface(surface);
419 if (xsurface->override_redirect &&
420 wlr_xwayland_or_surface_wants_focus(xsurface)) {
421 struct wlr_xwayland *xwayland = server.xwayland.wlr_xwayland;
422 wlr_xwayland_set_seat(xwayland, seat->wlr_seat);
423 seat_set_focus_surface(seat, xsurface->surface, false);
424 seat_pointer_notify_button(seat, time_msec, button, state);
425 return;
426 }
427 }
428#endif
429
429 seat_pointer_notify_button(seat, time_msec, button, state); 430 seat_pointer_notify_button(seat, time_msec, button, state);
430} 431}
431 432