mirror of
https://github.com/swaywm/sway.git
synced 2024-12-27 07:26:55 +01:00
input/seat: rename seat_set_exclusive_client()
This commit is contained in:
parent
607b8aed0c
commit
e8a0205607
3 changed files with 3 additions and 5 deletions
|
@ -198,8 +198,7 @@ void seat_set_focus_surface(struct sway_seat *seat,
|
||||||
void seat_set_focus_layer(struct sway_seat *seat,
|
void seat_set_focus_layer(struct sway_seat *seat,
|
||||||
struct wlr_layer_surface_v1 *layer);
|
struct wlr_layer_surface_v1 *layer);
|
||||||
|
|
||||||
void seat_set_exclusive_client(struct sway_seat *seat,
|
void seat_unfocus_unless_client(struct sway_seat *seat, struct wl_client *client);
|
||||||
struct wl_client *client);
|
|
||||||
|
|
||||||
struct sway_node *seat_get_focus(struct sway_seat *seat);
|
struct sway_node *seat_get_focus(struct sway_seat *seat);
|
||||||
|
|
||||||
|
|
|
@ -1369,8 +1369,7 @@ void seat_set_focus_layer(struct sway_seat *seat,
|
||||||
seat->focused_layer = layer;
|
seat->focused_layer = layer;
|
||||||
}
|
}
|
||||||
|
|
||||||
void seat_set_exclusive_client(struct sway_seat *seat,
|
void seat_unfocus_unless_client(struct sway_seat *seat, struct wl_client *client) {
|
||||||
struct wl_client *client) {
|
|
||||||
if (seat->focused_layer) {
|
if (seat->focused_layer) {
|
||||||
if (wl_resource_get_client(seat->focused_layer->resource) != client) {
|
if (wl_resource_get_client(seat->focused_layer->resource) != client) {
|
||||||
seat_set_focus_layer(seat, NULL);
|
seat_set_focus_layer(seat, NULL);
|
||||||
|
|
|
@ -184,7 +184,7 @@ static void handle_session_lock(struct wl_listener *listener, void *data) {
|
||||||
|
|
||||||
struct sway_seat *seat;
|
struct sway_seat *seat;
|
||||||
wl_list_for_each(seat, &server.input->seats, link) {
|
wl_list_for_each(seat, &server.input->seats, link) {
|
||||||
seat_set_exclusive_client(seat, client);
|
seat_unfocus_unless_client(seat, client);
|
||||||
}
|
}
|
||||||
|
|
||||||
wl_signal_add(&lock->events.new_surface, &server.session_lock.lock_new_surface);
|
wl_signal_add(&lock->events.new_surface, &server.session_lock.lock_new_surface);
|
||||||
|
|
Loading…
Reference in a new issue