aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/xwayland.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-04-07 14:43:38 -0400
committerLibravatar GitHub <noreply@github.com>2018-04-07 14:43:38 -0400
commit4b200869b2769a41d087c70e3e80124b2ed51064 (patch)
tree7a56e757655bf8e8943cb277c81a3e89f724f9ce /sway/desktop/xwayland.c
parentMerge pull request #1766 from emersion/fix-output-container-position (diff)
parentGive keyboard focus to unmanaged xwayland surfaces (diff)
downloadsway-aab4ac4d442fb57bdad69aba31379890e8651d28.tar.gz
sway-aab4ac4d442fb57bdad69aba31379890e8651d28.tar.zst
sway-aab4ac4d442fb57bdad69aba31379890e8651d28.zip
Merge pull request #1767 from emersion/fix-dmenu1.0-alpha.1
Give keyboard focus to unmanaged xwayland surfaces
Diffstat (limited to 'sway/desktop/xwayland.c')
-rw-r--r--sway/desktop/xwayland.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index 6de1365d..413dbf8b 100644
--- a/sway/desktop/xwayland.c
+++ b/sway/desktop/xwayland.c
@@ -59,6 +59,13 @@ static void unmanaged_handle_map(struct wl_listener *listener, void *data) {
59 surface->ly = xsurface->y; 59 surface->ly = xsurface->y;
60 desktop_damage_surface(xsurface->surface, surface->lx, surface->ly, true); 60 desktop_damage_surface(xsurface->surface, surface->lx, surface->ly, true);
61 61
62 if (!wlr_xwayland_surface_is_unmanaged(xsurface)) {
63 struct sway_seat *seat = input_manager_current_seat(input_manager);
64 struct wlr_xwayland *xwayland = seat->input->server->xwayland;
65 wlr_xwayland_set_seat(xwayland, seat->wlr_seat);
66 seat_set_focus_surface(seat, xsurface->surface);
67 }
68
62 // TODO: we don't send surface enter/leave events to xwayland unmanaged 69 // TODO: we don't send surface enter/leave events to xwayland unmanaged
63 // surfaces, but xwayland doesn't support HiDPI anyway 70 // surfaces, but xwayland doesn't support HiDPI anyway
64} 71}