aboutsummaryrefslogtreecommitdiff
path: root/sway/input/seat.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-07-18 12:42:09 -0700
committerGitHub <noreply@github.com>2018-07-18 12:42:09 -0700
commit4931d0ddc5d9de1f823af7efd931702b2fa80260 (patch)
treeb486f3576982ab0f94183323d44bc4bbb3a456e3 /sway/input/seat.c
parentca695482ec43fa247fc565161768584ef9534fea (diff)
parent747725b8bb35bf3fd38d442f5bb565e7a4b11ec4 (diff)
Merge pull request #2300 from emersion/override-redirect-updates
Handle xwayland override_redirect flag change
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 8ed4a3fe..eadf3b26 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -753,11 +753,11 @@ void seat_set_focus(struct sway_seat *seat,
}
void seat_set_focus_surface(struct sway_seat *seat,
- struct wlr_surface *surface) {
+ struct wlr_surface *surface, bool unfocus) {
if (seat->focused_layer != NULL) {
return;
}
- if (seat->has_focus) {
+ if (seat->has_focus && unfocus) {
struct sway_container *focus = seat_get_focus(seat);
seat_send_unfocus(focus, seat);
seat->has_focus = false;
@@ -789,7 +789,7 @@ void seat_set_focus_layer(struct sway_seat *seat,
} else if (!layer || seat->focused_layer == layer) {
return;
}
- seat_set_focus_surface(seat, layer->surface);
+ seat_set_focus_surface(seat, layer->surface, true);
if (layer->layer >= ZWLR_LAYER_SHELL_V1_LAYER_TOP) {
seat->focused_layer = layer;
}