cosmic-comp-config crate, and default input config
This adds a `input-default` setting, which is used for input settings if a device isn't set in `input-devices`. More awkwardly, it also adds an `input-touchpad` setting, which is used instead of `input-default` for touchpad devices, so we can separate mouse and touchpad settings even though they use the same capability and settings. This no longer sets the input config, and only reads it. If we add a UI for per-device config, we'll need some IPC mechanism to list connected devices. (Assuming cosmic-settings can't use libinput directly for that.) This moves `InputConfig` and `XkbConfig` to a new `cosmic-comp-config` crate, so they can be used in `cosmic-settings`.
This commit is contained in:
parent
0f5d654535
commit
56467755a8
9 changed files with 536 additions and 468 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
use crate::{
|
||||
backend::render::cursor::CursorState,
|
||||
config::{Action, Config, KeyPattern, WorkspaceLayout},
|
||||
config::{xkb_config_to_wl, Action, Config, KeyPattern, WorkspaceLayout},
|
||||
shell::{
|
||||
focus::{target::PointerFocusTarget, FocusDirection},
|
||||
grabs::{ResizeEdge, SeatMoveGrabState},
|
||||
|
|
@ -153,7 +153,7 @@ pub fn add_seat(
|
|||
// So instead of doing the right thing (and initialize these capabilities as matching
|
||||
// devices appear), we have to surrender to reality and just always expose a keyboard and pointer.
|
||||
let conf = config.xkb_config();
|
||||
if let Err(err) = seat.add_keyboard((&conf).into(), 200, 25) {
|
||||
if let Err(err) = seat.add_keyboard(xkb_config_to_wl(&conf), 200, 25) {
|
||||
warn!(
|
||||
?err,
|
||||
"Failed to load provided xkb config. Trying default...",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue