config: add mouse-follows-focus option
This commit is contained in:
parent
0d4ee299d4
commit
216d104b73
14 changed files with 134 additions and 6 deletions
|
|
@ -563,6 +563,7 @@ pub struct Config {
|
|||
pub workspace_display_order: Option<WorkspaceDisplayOrder>,
|
||||
pub simple_im: Option<SimpleIm>,
|
||||
pub fallback_output_mode: Option<FallbackOutputMode>,
|
||||
pub mouse_follows_focus: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
|
|
|
|||
|
|
@ -154,6 +154,7 @@ impl Parser for ConfigParser<'_> {
|
|||
fallback_output_mode_val,
|
||||
egui_val,
|
||||
clean_logs_older_than_val,
|
||||
mouse_follows_focus,
|
||||
),
|
||||
) = ext.extract((
|
||||
(
|
||||
|
|
@ -214,6 +215,7 @@ impl Parser for ConfigParser<'_> {
|
|||
opt(val("fallback-output-mode")),
|
||||
opt(val("egui")),
|
||||
opt(val("clean-logs-older-than")),
|
||||
recover(opt(bol("unstable-mouse-follows-focus"))),
|
||||
),
|
||||
))?;
|
||||
let mut keymap = None;
|
||||
|
|
@ -615,6 +617,7 @@ impl Parser for ConfigParser<'_> {
|
|||
workspace_display_order,
|
||||
simple_im,
|
||||
fallback_output_mode,
|
||||
mouse_follows_focus: mouse_follows_focus.despan(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1664,6 +1664,12 @@ fn load_config(initial_load: bool, auto_reload: bool, persistent: &Rc<Persistent
|
|||
if let Some(f) = &config.egui.monospace_fonts {
|
||||
set_egui_monospace_fonts(f.iter().map(|s| &**s));
|
||||
}
|
||||
if let Some(mouse_follows_focus) = config.mouse_follows_focus {
|
||||
#[expect(deprecated)]
|
||||
persistent
|
||||
.seat
|
||||
.unstable_set_mouse_follows_focus(mouse_follows_focus);
|
||||
}
|
||||
}
|
||||
|
||||
fn create_command(exec: &Exec) -> Command {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue