aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Simon Ser <contact@emersion.fr>2023-12-04 15:59:11 +0100
committerLibravatar Simon Ser <contact@emersion.fr>2023-12-13 10:11:35 +0100
commite8a02056079a6aa9bead020677667e51fc41a055 (patch)
tree531f12903ee6f12974c079acb535cf096a75335e
parentinput/seat: inline seat_set_exclusive_client() with NULL client (diff)
downloadsway-e8a02056079a6aa9bead020677667e51fc41a055.tar.gz
sway-e8a02056079a6aa9bead020677667e51fc41a055.tar.zst
sway-e8a02056079a6aa9bead020677667e51fc41a055.zip
input/seat: rename seat_set_exclusive_client()
-rw-r--r--include/sway/input/seat.h3
-rw-r--r--sway/input/seat.c3
-rw-r--r--sway/lock.c2
3 files changed, 3 insertions, 5 deletions
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
index a6c68fb8..28a3ea37 100644
--- a/include/sway/input/seat.h
+++ b/include/sway/input/seat.h
@@ -198,8 +198,7 @@ void seat_set_focus_surface(struct sway_seat *seat,
198void seat_set_focus_layer(struct sway_seat *seat, 198void seat_set_focus_layer(struct sway_seat *seat,
199 struct wlr_layer_surface_v1 *layer); 199 struct wlr_layer_surface_v1 *layer);
200 200
201void seat_set_exclusive_client(struct sway_seat *seat, 201void seat_unfocus_unless_client(struct sway_seat *seat, struct wl_client *client);
202 struct wl_client *client);
203 202
204struct sway_node *seat_get_focus(struct sway_seat *seat); 203struct sway_node *seat_get_focus(struct sway_seat *seat);
205 204
diff --git a/sway/input/seat.c b/sway/input/seat.c
index b269a4cd..31c9b72b 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -1369,8 +1369,7 @@ void seat_set_focus_layer(struct sway_seat *seat,
1369 seat->focused_layer = layer; 1369 seat->focused_layer = layer;
1370} 1370}
1371 1371
1372void seat_set_exclusive_client(struct sway_seat *seat, 1372void seat_unfocus_unless_client(struct sway_seat *seat, struct wl_client *client) {
1373 struct wl_client *client) {
1374 if (seat->focused_layer) { 1373 if (seat->focused_layer) {
1375 if (wl_resource_get_client(seat->focused_layer->resource) != client) { 1374 if (wl_resource_get_client(seat->focused_layer->resource) != client) {
1376 seat_set_focus_layer(seat, NULL); 1375 seat_set_focus_layer(seat, NULL);
diff --git a/sway/lock.c b/sway/lock.c
index ec2a7695..c4fbfe0e 100644
--- a/sway/lock.c
+++ b/sway/lock.c
@@ -184,7 +184,7 @@ static void handle_session_lock(struct wl_listener *listener, void *data) {
184 184
185 struct sway_seat *seat; 185 struct sway_seat *seat;
186 wl_list_for_each(seat, &server.input->seats, link) { 186 wl_list_for_each(seat, &server.input->seats, link) {
187 seat_set_exclusive_client(seat, client); 187 seat_unfocus_unless_client(seat, client);
188 } 188 }
189 189
190 wl_signal_add(&lock->events.new_surface, &server.session_lock.lock_new_surface); 190 wl_signal_add(&lock->events.new_surface, &server.session_lock.lock_new_surface);