diff options
| author | Drew DeVault <sir@cmpwn.com> | 2018-03-31 09:29:34 -0400 | 
|---|---|---|
| committer | Drew DeVault <sir@cmpwn.com> | 2018-03-31 09:29:34 -0400 | 
| commit | 5c08e13e5093a393a42b7310de9ac24bb374d313 (patch) | |
| tree | 143f996b86221a3b3613ce807bc15e2a95ca7817 /sway/input | |
| parent | ae0552606b00decceaced48707fc24fedbbecad4 (diff) | |
| download | sway-5c08e13e5093a393a42b7310de9ac24bb374d313.tar.xz | |
Set Xwayland seat on focus
Necessary to make primary selection syncronize
Diffstat (limited to 'sway/input')
| -rw-r--r-- | sway/input/seat.c | 8 | 
1 files changed, 7 insertions, 1 deletions
| diff --git a/sway/input/seat.c b/sway/input/seat.c index f969636a..8d592872 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -291,7 +291,8 @@ void sway_seat_configure_xcursor(struct sway_seat *seat) {  		seat->cursor->cursor->y);  } -void sway_seat_set_focus(struct sway_seat *seat, struct sway_container *container) { +void sway_seat_set_focus(struct sway_seat *seat, +		struct sway_container *container) {  	struct sway_container *last_focus = sway_seat_get_focus(seat);  	if (container && last_focus == container) { @@ -311,6 +312,11 @@ void sway_seat_set_focus(struct sway_seat *seat, struct sway_container *containe  		if (container->type == C_VIEW) {  			struct sway_view *view = container->sway_view;  			view_set_activated(view, true); +			if (view->type == SWAY_XWAYLAND_VIEW) { +				struct wlr_xwayland *xwayland = +					seat->input->server->xwayland; +				wlr_xwayland_set_seat(xwayland, seat->wlr_seat); +			}  			struct wlr_keyboard *keyboard =  				wlr_seat_get_keyboard(seat->wlr_seat);  			if (keyboard) { | 
