diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-07-29 13:49:58 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-29 13:49:58 -0400 |
commit | ca8f177e143de81af3c050e6dc01b7ecebaeea34 (patch) | |
tree | 678c794703ab73ec2db38a747943eef0dd811cec | |
parent | Merge pull request #2380 from mariusor/tap-button-map-man-fix (diff) | |
parent | Don't give focus if xwayland window has a type hint (diff) | |
download | sway-ca8f177e143de81af3c050e6dc01b7ecebaeea34.tar.gz sway-ca8f177e143de81af3c050e6dc01b7ecebaeea34.tar.zst sway-ca8f177e143de81af3c050e6dc01b7ecebaeea34.zip |
Merge pull request #2379 from emersion/xwayland-unmanaged
Don't give focus if xwayland window has a type hint
-rw-r--r-- | sway/desktop/xwayland.c | 12 |
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) { | |||
69 | surface->ly = xsurface->y; | 69 | surface->ly = xsurface->y; |
70 | desktop_damage_surface(xsurface->surface, surface->lx, surface->ly, true); | 70 | desktop_damage_surface(xsurface->surface, surface->lx, surface->ly, true); |
71 | 71 | ||
72 | struct sway_seat *seat = input_manager_current_seat(input_manager); | 72 | if (wlr_xwayland_or_surface_wants_focus(xsurface)) { |
73 | struct wlr_xwayland *xwayland = | 73 | struct sway_seat *seat = input_manager_current_seat(input_manager); |
74 | seat->input->server->xwayland.wlr_xwayland; | 74 | struct wlr_xwayland *xwayland = |
75 | wlr_xwayland_set_seat(xwayland, seat->wlr_seat); | 75 | seat->input->server->xwayland.wlr_xwayland; |
76 | seat_set_focus_surface(seat, xsurface->surface, false); | 76 | wlr_xwayland_set_seat(xwayland, seat->wlr_seat); |
77 | seat_set_focus_surface(seat, xsurface->surface, false); | ||
78 | } | ||
77 | } | 79 | } |
78 | 80 | ||
79 | static void unmanaged_handle_unmap(struct wl_listener *listener, void *data) { | 81 | static void unmanaged_handle_unmap(struct wl_listener *listener, void *data) { |