mirror of
https://github.com/swaywm/sway.git
synced 2026-04-28 06:46:26 -04:00
store layout per keyboard for every window
Fixes: https://github.com/swaywm/sway/issues/2361 Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
This commit is contained in:
parent
481accca2a
commit
3a5544f56c
9 changed files with 143 additions and 5 deletions
|
|
@ -63,10 +63,16 @@ struct sway_keyboard {
|
|||
|
||||
struct wl_event_source *key_repeat_source;
|
||||
struct sway_binding *repeat_binding;
|
||||
xkb_layout_index_t default_kbd_layout;
|
||||
};
|
||||
|
||||
struct xkb_keymap *sway_keyboard_compile_keymap(struct input_config *ic);
|
||||
|
||||
struct sway_layout_per_kbd {
|
||||
struct wlr_keyboard *kbd;
|
||||
xkb_layout_index_t layout;
|
||||
};
|
||||
|
||||
struct sway_keyboard *sway_keyboard_create(struct sway_seat *seat,
|
||||
struct sway_seat_device *device);
|
||||
|
||||
|
|
@ -74,5 +80,9 @@ void sway_keyboard_configure(struct sway_keyboard *keyboard);
|
|||
|
||||
void sway_keyboard_destroy(struct sway_keyboard *keyboard);
|
||||
|
||||
void sway_keyboard_set_layout(struct wlr_keyboard *kbd, xkb_layout_index_t layout);
|
||||
|
||||
xkb_layout_index_t sway_keyboard_get_layout(struct xkb_state *kbd_state);
|
||||
|
||||
void sway_keyboard_disarm_key_repeat(struct sway_keyboard *keyboard);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -111,6 +111,8 @@ struct sway_view {
|
|||
} events;
|
||||
|
||||
struct wl_listener surface_new_subsurface;
|
||||
|
||||
list_t *kbd_layouts; // struct sway_layout_per_kbd *
|
||||
};
|
||||
|
||||
struct sway_xdg_shell_v6_view {
|
||||
|
|
@ -309,7 +311,7 @@ void view_for_each_popup(struct sway_view *view,
|
|||
|
||||
// view implementation
|
||||
|
||||
void view_init(struct sway_view *view, enum sway_view_type type,
|
||||
bool view_init(struct sway_view *view, enum sway_view_type type,
|
||||
const struct sway_view_impl *impl);
|
||||
|
||||
void view_destroy(struct sway_view *view);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue