1
0
Fork 0
forked from wry/wry

toml-config: add use-hardware-cursor setting

This commit is contained in:
Julian Orth 2025-07-17 21:48:18 +02:00
parent e89763e3fe
commit 0a3d022829
6 changed files with 26 additions and 0 deletions

View file

@ -482,6 +482,7 @@ pub struct Config {
pub client_rules: Vec<ClientRule>,
pub window_rules: Vec<WindowRule>,
pub pointer_revert_key: Option<KeySym>,
pub use_hardware_cursor: Option<bool>,
}
#[derive(Debug, Error)]

View file

@ -131,6 +131,7 @@ impl Parser for ConfigParser<'_> {
client_rules_val,
window_rules_val,
pointer_revert_key_str,
use_hardware_cursor,
),
) = ext.extract((
(
@ -177,6 +178,7 @@ impl Parser for ConfigParser<'_> {
opt(val("clients")),
opt(val("windows")),
recover(opt(str("pointer-revert-key"))),
recover(opt(bol("use-hardware-cursor"))),
),
))?;
let mut keymap = None;
@ -491,6 +493,7 @@ impl Parser for ConfigParser<'_> {
client_rules,
window_rules,
pointer_revert_key,
use_hardware_cursor: use_hardware_cursor.despan(),
})
}
}

View file

@ -1244,6 +1244,9 @@ fn load_config(initial_load: bool, persistent: &Rc<PersistentState>) {
if let Some(key) = config.pointer_revert_key {
persistent.seat.set_pointer_revert_key(key);
}
if let Some(v) = config.use_hardware_cursor {
persistent.seat.use_hardware_cursor(v);
}
}
fn create_command(exec: &Exec) -> Command {