summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/input/input-manager.c16
-rw-r--r--swaybar/bar.c2
2 files changed, 6 insertions, 12 deletions
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c
index 5be4143f..91c45dd1 100644
--- a/sway/input/input-manager.c
+++ b/sway/input/input-manager.c
@@ -30,6 +30,10 @@ struct sway_seat *input_manager_current_seat(void) {
30 return seat; 30 return seat;
31} 31}
32 32
33struct sway_seat *input_manager_get_default_seat(void) {
34 return input_manager_get_seat(DEFAULT_SEAT);
35}
36
33struct sway_seat *input_manager_get_seat(const char *seat_name) { 37struct sway_seat *input_manager_get_seat(const char *seat_name) {
34 struct sway_seat *seat = NULL; 38 struct sway_seat *seat = NULL;
35 wl_list_for_each(seat, &server.input->seats, link) { 39 wl_list_for_each(seat, &server.input->seats, link) {
@@ -294,7 +298,7 @@ static void handle_new_input(struct wl_listener *listener, void *data) {
294 struct sway_seat *seat = NULL; 298 struct sway_seat *seat = NULL;
295 if (!input_has_seat_configuration()) { 299 if (!input_has_seat_configuration()) {
296 wlr_log(WLR_DEBUG, "no seat configuration, using default seat"); 300 wlr_log(WLR_DEBUG, "no seat configuration, using default seat");
297 seat = input_manager_get_seat(DEFAULT_SEAT); 301 seat = input_manager_get_default_seat();
298 seat_add_device(seat, input_device); 302 seat_add_device(seat, input_device);
299 return; 303 return;
300 } 304 }
@@ -517,16 +521,6 @@ void input_manager_configure_xcursor(void) {
517 } 521 }
518} 522}
519 523
520struct sway_seat *input_manager_get_default_seat(void) {
521 struct sway_seat *seat = NULL;
522 wl_list_for_each(seat, &server.input->seats, link) {
523 if (strcmp(seat->wlr_seat->name, DEFAULT_SEAT) == 0) {
524 return seat;
525 }
526 }
527 return seat;
528}
529
530struct input_config *input_device_get_config(struct sway_input_device *device) { 524struct input_config *input_device_get_config(struct sway_input_device *device) {
531 struct input_config *wildcard_config = NULL; 525 struct input_config *wildcard_config = NULL;
532 struct input_config *input_config = NULL; 526 struct input_config *input_config = NULL;
diff --git a/swaybar/bar.c b/swaybar/bar.c
index 5e9767b2..fa761925 100644
--- a/swaybar/bar.c
+++ b/swaybar/bar.c
@@ -102,7 +102,7 @@ static void add_layer_surface(struct swaybar_output *output) {
102 bool hidden = strcmp(config->mode, "hide") == 0; 102 bool hidden = strcmp(config->mode, "hide") == 0;
103 output->layer_surface = zwlr_layer_shell_v1_get_layer_surface( 103 output->layer_surface = zwlr_layer_shell_v1_get_layer_surface(
104 bar->layer_shell, output->surface, output->output, 104 bar->layer_shell, output->surface, output->output,
105 hidden ? ZWLR_LAYER_SHELL_V1_LAYER_TOP : 105 hidden ? ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY :
106 ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM, "panel"); 106 ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM, "panel");
107 assert(output->layer_surface); 107 assert(output->layer_surface);
108 zwlr_layer_surface_v1_add_listener(output->layer_surface, 108 zwlr_layer_surface_v1_add_listener(output->layer_surface,