1
0
Fork 0
forked from wry/wry

add mouse_follows_focus

This commit is contained in:
kossLAN 2026-06-06 20:05:20 -04:00
parent e61f042d8b
commit 3a4105dd42
No known key found for this signature in database
8 changed files with 72 additions and 22 deletions

View file

@ -154,10 +154,10 @@ impl Parser for ConfigParser<'_> {
show_titles,
fallback_output_mode_val,
clean_logs_older_than_val,
mouse_follows_focus,
unstable_mouse_follows_focus,
animations_val,
),
(scratchpads_val, autotile),
(scratchpads_val, autotile, mouse_follows_focus),
) = ext.extract((
(
opt(val("keymap")),
@ -219,7 +219,11 @@ impl Parser for ConfigParser<'_> {
recover(opt(bol("unstable-mouse-follows-focus"))),
opt(val("animations")),
),
(opt(val("scratchpads")), recover(opt(bol("autotile")))),
(
opt(val("scratchpads")),
recover(opt(bol("autotile"))),
recover(opt(bol("mouse-follows-focus"))),
),
))?;
let mut keymap = None;
if let Some(value) = keymap_val {
@ -633,7 +637,10 @@ impl Parser for ConfigParser<'_> {
workspace_display_order,
simple_im,
fallback_output_mode,
mouse_follows_focus: mouse_follows_focus.despan(),
mouse_follows_focus: mouse_follows_focus
.despan()
.or_else(|| unstable_mouse_follows_focus.despan())
.or(Some(true)),
scratchpads,
autotile: autotile.despan(),
})

View file

@ -1849,10 +1849,7 @@ fn load_config(initial_load: bool, auto_reload: bool, persistent: &Rc<Persistent
persistent.seat.set_fallback_output_mode(v);
}
if let Some(mouse_follows_focus) = config.mouse_follows_focus {
#[expect(deprecated)]
persistent
.seat
.unstable_set_mouse_follows_focus(mouse_follows_focus);
persistent.seat.set_mouse_follows_focus(mouse_follows_focus);
}
if let Some(v) = config.autotile {
set_autotile(v);