aboutsummaryrefslogtreecommitdiff
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) {
return seat;
}
+struct sway_seat *input_manager_get_default_seat(void) {
+ return input_manager_get_seat(DEFAULT_SEAT);
+}
+
struct sway_seat *input_manager_get_seat(const char *seat_name) {
struct sway_seat *seat = NULL;
wl_list_for_each(seat, &server.input->seats, link) {
@@ -294,7 +298,7 @@ static void handle_new_input(struct wl_listener *listener, void *data) {
struct sway_seat *seat = NULL;
if (!input_has_seat_configuration()) {
wlr_log(WLR_DEBUG, "no seat configuration, using default seat");
- seat = input_manager_get_seat(DEFAULT_SEAT);
+ seat = input_manager_get_default_seat();
seat_add_device(seat, input_device);
return;
}
@@ -517,16 +521,6 @@ void input_manager_configure_xcursor(void) {
}
}
-struct sway_seat *input_manager_get_default_seat(void) {
- struct sway_seat *seat = NULL;
- wl_list_for_each(seat, &server.input->seats, link) {
- if (strcmp(seat->wlr_seat->name, DEFAULT_SEAT) == 0) {
- return seat;
- }
- }
- return seat;
-}
-
struct input_config *input_device_get_config(struct sway_input_device *device) {
struct input_config *wildcard_config = NULL;
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) {
bool hidden = strcmp(config->mode, "hide") == 0;
output->layer_surface = zwlr_layer_shell_v1_get_layer_surface(
bar->layer_shell, output->surface, output->output,
- hidden ? ZWLR_LAYER_SHELL_V1_LAYER_TOP :
+ hidden ? ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY :
ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM, "panel");
assert(output->layer_surface);
zwlr_layer_surface_v1_add_listener(output->layer_surface,