aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
Diffstat (limited to 'sway')
-rw-r--r--sway/commands/input/xkb_layout.c4
-rw-r--r--sway/commands/input/xkb_model.c4
-rw-r--r--sway/commands/input/xkb_options.c4
-rw-r--r--sway/commands/input/xkb_rules.c4
-rw-r--r--sway/commands/input/xkb_variant.c4
-rw-r--r--sway/desktop/wl_shell.c2
-rw-r--r--sway/desktop/xdg_shell_v6.c2
-rw-r--r--sway/desktop/xwayland.c2
-rw-r--r--sway/input/input-manager.c29
-rw-r--r--sway/input/keyboard.c2
10 files changed, 21 insertions, 36 deletions
diff --git a/sway/commands/input/xkb_layout.c b/sway/commands/input/xkb_layout.c
index 4fc33e0b..a25d3850 100644
--- a/sway/commands/input/xkb_layout.c
+++ b/sway/commands/input/xkb_layout.c
@@ -18,8 +18,8 @@ struct cmd_results *input_cmd_xkb_layout(int argc, char **argv) {
new_config->xkb_layout = strdup(argv[0]);
- sway_log(L_DEBUG, "apply-xkb_layout for device: %s",
- current_input_config->identifier);
+ sway_log(L_DEBUG, "apply-xkb_layout for device: %s layout: %s",
+ current_input_config->identifier, new_config->xkb_layout);
apply_input_config(new_config);
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
}
diff --git a/sway/commands/input/xkb_model.c b/sway/commands/input/xkb_model.c
index 338bd7de..9729e869 100644
--- a/sway/commands/input/xkb_model.c
+++ b/sway/commands/input/xkb_model.c
@@ -18,8 +18,8 @@ struct cmd_results *input_cmd_xkb_model(int argc, char **argv) {
new_config->xkb_model = strdup(argv[0]);
- sway_log(L_DEBUG, "apply-xkb_model for device: %s",
- current_input_config->identifier);
+ sway_log(L_DEBUG, "apply-xkb_model for device: %s model: %s",
+ current_input_config->identifier, new_config->xkb_model);
apply_input_config(new_config);
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
}
diff --git a/sway/commands/input/xkb_options.c b/sway/commands/input/xkb_options.c
index b24c33c1..504849cc 100644
--- a/sway/commands/input/xkb_options.c
+++ b/sway/commands/input/xkb_options.c
@@ -18,8 +18,8 @@ struct cmd_results *input_cmd_xkb_options(int argc, char **argv) {
new_config->xkb_options = strdup(argv[0]);
- sway_log(L_DEBUG, "apply-xkb_options for device: %s",
- current_input_config->identifier);
+ sway_log(L_DEBUG, "apply-xkb_options for device: %s options: %s",
+ current_input_config->identifier, new_config->xkb_options);
apply_input_config(new_config);
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
}
diff --git a/sway/commands/input/xkb_rules.c b/sway/commands/input/xkb_rules.c
index def614e9..db7d8abe 100644
--- a/sway/commands/input/xkb_rules.c
+++ b/sway/commands/input/xkb_rules.c
@@ -18,8 +18,8 @@ struct cmd_results *input_cmd_xkb_rules(int argc, char **argv) {
new_config->xkb_rules = strdup(argv[0]);
- sway_log(L_DEBUG, "apply-xkb_rules for device: %s",
- current_input_config->identifier);
+ sway_log(L_DEBUG, "apply-xkb_rules for device: %s rules: %s",
+ current_input_config->identifier, new_config->xkb_rules);
apply_input_config(new_config);
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
}
diff --git a/sway/commands/input/xkb_variant.c b/sway/commands/input/xkb_variant.c
index cc135cce..855e6abc 100644
--- a/sway/commands/input/xkb_variant.c
+++ b/sway/commands/input/xkb_variant.c
@@ -18,8 +18,8 @@ struct cmd_results *input_cmd_xkb_variant(int argc, char **argv) {
new_config->xkb_variant = strdup(argv[0]);
- sway_log(L_DEBUG, "apply-xkb_variant for device: %s",
- current_input_config->identifier);
+ sway_log(L_DEBUG, "apply-xkb_variant for device: %s variant: %s",
+ current_input_config->identifier, new_config->xkb_variant);
apply_input_config(new_config);
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
}
diff --git a/sway/desktop/wl_shell.c b/sway/desktop/wl_shell.c
index df81d5be..e7150bf3 100644
--- a/sway/desktop/wl_shell.c
+++ b/sway/desktop/wl_shell.c
@@ -55,8 +55,6 @@ static void handle_commit(struct wl_listener *listener, void *data) {
struct sway_wl_shell_surface *sway_surface =
wl_container_of(listener, sway_surface, commit);
struct sway_view *view = sway_surface->view;
- sway_log(L_DEBUG, "wl_shell surface commit %dx%d",
- sway_surface->pending_width, sway_surface->pending_height);
// NOTE: We intentionally discard the view's desired width here
// TODO: Let floating views do whatever
view->width = sway_surface->pending_width;
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c
index 82775e2f..015cc9d0 100644
--- a/sway/desktop/xdg_shell_v6.c
+++ b/sway/desktop/xdg_shell_v6.c
@@ -61,8 +61,6 @@ static void handle_commit(struct wl_listener *listener, void *data) {
struct sway_xdg_surface_v6 *sway_surface =
wl_container_of(listener, sway_surface, commit);
struct sway_view *view = sway_surface->view;
- sway_log(L_DEBUG, "xdg surface commit %dx%d",
- sway_surface->pending_width, sway_surface->pending_height);
// NOTE: We intentionally discard the view's desired width here
// TODO: Let floating views do whatever
view->width = sway_surface->pending_width;
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index 29bed955..42e82c64 100644
--- a/sway/desktop/xwayland.c
+++ b/sway/desktop/xwayland.c
@@ -84,8 +84,6 @@ static void handle_commit(struct wl_listener *listener, void *data) {
struct sway_xwayland_surface *sway_surface =
wl_container_of(listener, sway_surface, commit);
struct sway_view *view = sway_surface->view;
- sway_log(L_DEBUG, "xwayland surface commit %dx%d",
- sway_surface->pending_width, sway_surface->pending_height);
// NOTE: We intentionally discard the view's desired width here
// TODO: Let floating views do whatever
view->width = sway_surface->pending_width;
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c
index 12a66917..52da8f5e 100644
--- a/sway/input/input-manager.c
+++ b/sway/input/input-manager.c
@@ -83,17 +83,6 @@ static struct sway_input_device *input_sway_device_from_wlr(
return NULL;
}
-static struct sway_input_device *input_sway_device_from_config(
- struct sway_input_manager *input, struct input_config *config) {
- struct sway_input_device *input_device = NULL;
- wl_list_for_each(input_device, &input->devices, link) {
- if (strcmp(input_device->identifier, config->identifier) == 0) {
- return input_device;
- }
- }
- return NULL;
-}
-
static bool input_has_seat_configuration(struct sway_input_manager *input) {
struct sway_seat *seat = NULL;
wl_list_for_each(seat, &input->seats, link) {
@@ -238,16 +227,16 @@ void sway_input_manager_set_focus(struct sway_input_manager *input,
void sway_input_manager_apply_input_config(struct sway_input_manager *input,
struct input_config *input_config) {
- struct sway_input_device *input_device =
- input_sway_device_from_config(input, input_config);
- if (!input_device) {
- return;
- }
- input_device->config = input_config;
+ struct sway_input_device *input_device = NULL;
+ wl_list_for_each(input_device, &input->devices, link) {
+ if (strcmp(input_device->identifier, input_config->identifier) == 0) {
+ input_device->config = input_config;
- struct sway_seat *seat = NULL;
- wl_list_for_each(seat, &input->seats, link) {
- sway_seat_configure_device(seat, input_device);
+ struct sway_seat *seat = NULL;
+ wl_list_for_each(seat, &input->seats, link) {
+ sway_seat_configure_device(seat, input_device);
+ }
+ }
}
}
diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c
index ce0df3c5..bb18edd2 100644
--- a/sway/input/keyboard.c
+++ b/sway/input/keyboard.c
@@ -91,6 +91,8 @@ void sway_keyboard_configure(struct sway_keyboard *keyboard) {
wlr_keyboard_set_keymap(wlr_device->keyboard, keyboard->keymap);
wlr_keyboard_set_repeat_info(wlr_device->keyboard, 25, 600);
xkb_context_unref(context);
+ struct wlr_seat *seat = keyboard->seat_device->sway_seat->wlr_seat;
+ wlr_seat_set_keyboard(seat, wlr_device);
wl_list_remove(&keyboard->keyboard_key.link);
wl_signal_add(&wlr_device->keyboard->events.key, &keyboard->keyboard_key);