diff options
| author | Tony Crisci <tony@dubstepdish.com> | 2018-04-04 00:20:44 -0400 | 
|---|---|---|
| committer | Tony Crisci <tony@dubstepdish.com> | 2018-04-04 00:20:44 -0400 | 
| commit | 741e3959e30283f5f699f7e9fa6620e3578b9c76 (patch) | |
| tree | 8489f010c2f3e112722e7b999bacef18dfe418ef /sway/input/cursor.c | |
| parent | 9d1cbd77aca72ca72eaba5056de5805b14f004c1 (diff) | |
| parent | 3ea7d2d10ed0d6d68e5bf3dd4efac765eb2b0212 (diff) | |
| download | sway-741e3959e30283f5f699f7e9fa6620e3578b9c76.tar.xz | |
Merge branch 'wlroots' into split-containers2
Diffstat (limited to 'sway/input/cursor.c')
| -rw-r--r-- | sway/input/cursor.c | 11 | 
1 files changed, 8 insertions, 3 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index 97b4473c..9229e92d 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c @@ -180,13 +180,18 @@ static void handle_cursor_button(struct wl_listener *listener, void *data) {  	double sx, sy;  	struct sway_container *cont =  		container_at_cursor(cursor, &surface, &sx, &sy); +	if (surface && wlr_surface_is_layer_surface(surface)) { +		struct wlr_layer_surface *layer = +			wlr_layer_surface_from_wlr_surface(surface); +		if (layer->current.keyboard_interactive) { +			seat_set_focus_layer(cursor->seat, layer); +			return; +		} +	}  	// Avoid moving keyboard focus from a surface that accepts it to one  	// that does not unless the change would move us to a new workspace.  	//  	// This prevents, for example, losing focus when clicking on swaybar. -	// -	// TODO: Replace this condition with something like -	// !surface_accepts_keyboard_input  	if (surface && cont && cont->type != C_VIEW) {  		struct sway_container *new_ws = cont;  		if (new_ws && new_ws->type != C_WORKSPACE) {  | 
