Add cosmic-keyboard-layout-unstable-v1 protocol

https://github.com/pop-os/cosmic-protocols/pull/28

Allows clients like `cosmic-applet-input-sources` to show which layout
group is active and update it. Currently this is implemented by update
the `xkb_config` to change the layout order.
This commit is contained in:
Ian Douglas Scott 2024-07-29 13:56:42 -07:00 committed by Victoria Brekenfeld
parent 031fdc389a
commit 29320bdab5
7 changed files with 215 additions and 11 deletions

View file

@ -0,0 +1,10 @@
// SPDX-License-Identifier: GPL-3.0-only
use crate::state::State;
use crate::wayland::protocols::keyboard_layout::{KeyboardLayoutHandler, KeyboardLayoutState};
impl KeyboardLayoutHandler for State {
fn keyboard_layout_state(&mut self) -> &mut KeyboardLayoutState {
&mut self.common.keyboard_layout_state
}
}

View file

@ -18,6 +18,7 @@ pub mod idle_notify;
pub mod image_capture_source;
pub mod image_copy_capture;
pub mod input_method;
pub mod keyboard_layout;
pub mod keyboard_shortcuts_inhibit;
pub mod layer_shell;
pub mod output;