aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-07-29 13:49:58 -0400
committerGitHub <noreply@github.com>2018-07-29 13:49:58 -0400
commitca8f177e143de81af3c050e6dc01b7ecebaeea34 (patch)
tree678c794703ab73ec2db38a747943eef0dd811cec /sway
parent8fcf0505d096ce1564e39fb5f6c2256e3f704ad2 (diff)
parent9a7e436fad96e9a99f1c06fecedba93828bf4dc1 (diff)
Merge pull request #2379 from emersion/xwayland-unmanaged
Don't give focus if xwayland window has a type hint
Diffstat (limited to 'sway')
-rw-r--r--sway/desktop/xwayland.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index 390ca580..398446f8 100644
--- a/sway/desktop/xwayland.c
+++ b/sway/desktop/xwayland.c
@@ -69,11 +69,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);
- struct sway_seat *seat = input_manager_current_seat(input_manager);
- struct wlr_xwayland *xwayland =
- seat->input->server->xwayland.wlr_xwayland;
- wlr_xwayland_set_seat(xwayland, seat->wlr_seat);
- seat_set_focus_surface(seat, xsurface->surface, false);
+ if (wlr_xwayland_or_surface_wants_focus(xsurface)) {
+ struct sway_seat *seat = input_manager_current_seat(input_manager);
+ struct wlr_xwayland *xwayland =
+ seat->input->server->xwayland.wlr_xwayland;
+ wlr_xwayland_set_seat(xwayland, seat->wlr_seat);
+ seat_set_focus_surface(seat, xsurface->surface, false);
+ }
}
static void unmanaged_handle_unmap(struct wl_listener *listener, void *data) {