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

@ -26,7 +26,9 @@ use std::{
time::{Duration, Instant},
};
use tracing::{error, info, warn};
use wayland::protocols::overlap_notify::OverlapNotifyState;
use wayland::protocols::{
keyboard_layout::KeyboardLayoutState, overlap_notify::OverlapNotifyState,
};
use crate::wayland::handlers::compositor::client_compositor_state;
@ -331,5 +333,6 @@ fn refresh(state: &mut State) {
state::Common::refresh_focus(state);
OverlapNotifyState::refresh(state);
state.common.update_x11_stacking_order();
KeyboardLayoutState::refresh(state);
state.last_refresh = LastRefresh::At(Instant::now());
}