From adc1a56982c70c06a0f8549c2c1b3bddd17930c2 Mon Sep 17 00:00:00 2001 From: srdusr <99972264+srdusr@users.noreply.github.com> Date: Sat, 24 Aug 2024 09:11:00 +0200 Subject: Implement general.focus_follows_mouse/auto_raise; remove the rest as dead Auditing "clicking behavior and basics": general.focus_follows_mouse, general.mouse_follows_focus, general.auto_raise, general.auto_focus, the entire window.* namespace (8 more keys, a full duplicate of the same four plus remember_position/size/state), and general. smart_placement/border_width were all seeded into default_config() and documented in DEFAULTS.md, but none were read anywhere - srd.set()/ srd.get() on any of them silently succeeded while doing nothing. focus_follows_mouse is real, well-defined, and directly relevant to clicking basics - implemented it plus auto_raise (raise, not just focus, on hover) rather than just deleting the promise like the others. WindowManager gained focus_follows_mouse/auto_raise bools, wired from apply_general_settings the same way every other general.* flag is. handle_pointer_position now tracks whichever window (content or decoration) is under the pointer and, when the setting is on and that differs from the currently-focused window, focuses it through the same focus_window() free function every click-driven focus change already uses (real keyboard focus, not just core state) - skipped entirely while dragging/resizing or over a layer-shell surface, so the pointer sweeping over other windows mid-drag or hovering a bar can't steal focus from what's actually being manipulated. mouse_follows_focus (pointer warp on keybinding-driven focus change) and auto_focus (no clear distinct meaning beyond click-to-focus) stay unimplemented and are now undocumented rather than promised. --- docs/DEFAULTS.md | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'docs') diff --git a/docs/DEFAULTS.md b/docs/DEFAULTS.md index 972e330..4b4e195 100644 --- a/docs/DEFAULTS.md +++ b/docs/DEFAULTS.md @@ -8,19 +8,23 @@ This document describes all default configuration values and available options f ### Global Settings (`general.*`) ```lua srd.set("general.default_layout", "dynamic") -- Default: "dynamic" -srd.set("general.smart_placement", true) -- Default: true srd.set("general.window_gap", 8) -- Default: 8 -srd.set("general.border_width", 2) -- Default: 2 srd.set("general.animations", true) -- Default: true srd.set("general.animation_duration", 200) -- Default: 200ms srd.set("general.shadows", true) -- Default: true srd.set("general.resize_margin", 6) -- Default: 6px srd.set("general.rounded_corners", true) -- Default: true on GLES/winit, false on udev/Pixman (opt-in there) -srd.set("general.focus_follows_mouse", false) -- Default: false -srd.set("general.mouse_follows_focus", true) -- Default: true -srd.set("general.auto_raise", false) -- Default: false -srd.set("general.auto_focus", true) -- Default: true +srd.set("general.focus_follows_mouse", false) -- Default: false - hover a window to focus it, no click needed +srd.set("general.auto_raise", false) -- Default: false - also raise on hover-focus, not just focus ``` +`general.smart_placement`/`general.border_width` are not listed: neither +is implemented - new-window placement always uses smart placement +unconditionally (no toggle exists), and the real, working border-width +setting is `theme.decorations.border.width` below. +`general.mouse_follows_focus` (warp the pointer to match a keybinding- +driven focus change) and `general.auto_focus` (no clear distinct meaning +found beyond what plain click-to-focus already does) aren't implemented +either. ### Monitor Settings (`monitor.*`) ```lua @@ -34,15 +38,12 @@ workspace"/"this monitor's workspace count" to configure. `workspace.count` below is the actual knob. ### Window Behavior (`window.*`) -```lua -srd.set("window.focus_follows_mouse", false) -- Default: false -srd.set("window.mouse_follows_focus", true) -- Default: true -srd.set("window.auto_raise", false) -- Default: false -srd.set("window.auto_focus", true) -- Default: true -srd.set("window.raise_on_focus", true) -- Default: true -srd.set("window.remember_position", true) -- Default: true -srd.set("window.remember_size", true) -- Default: true -srd.set("window.remember_state", true) -- Default: true +Not implemented: this whole namespace duplicated `general.*`'s own focus +keys (see above for the two of those that are real) plus three genuinely +unbuilt per-app-window-state-persistence keys (`remember_position`/ +`remember_size`/`remember_state` - no window remembers anything about a +previous run; every new window starts at a hardcoded size, see +`crates/wayland/src/xwayland.rs`/`state/lifecycle.rs`'s `new_managed_window`). ``` ### Workspace Settings (`workspace.*`) -- cgit v1.2.3