diff options
| author | srdusr <[email protected]> | 2026-05-11 16:44:00 +0200 |
|---|---|---|
| committer | srdusr <[email protected]> | 2026-05-11 16:44:00 +0200 |
| commit | caec1e7c355bbe6437afe87cd3dab6b64fb91e0a (patch) | |
| tree | 5ecab25d2ebc36949ac4129b35e35334a575d563 /crates/core/src | |
| parent | baabd91411dacd179c690f724b6cbfe6270cb131 (diff) | |
| download | srdwm-caec1e7c355bbe6437afe87cd3dab6b64fb91e0a.tar.gz srdwm-caec1e7c355bbe6437afe87cd3dab6b64fb91e0a.zip | |
Three live bug reports after a restart: icon drag, lock cursor, lock box
All three reported directly after the owner restarted into today's build.
Desktop icons could not be dragged at all in single-click mode. The press
handler opened the icon immediately when general.desktop_icon_single_click
was on, so the branch that starts a drag was unreachable and an icon could
never be moved. Deciding activation on press cannot distinguish a click from
the first instant of a drag. Every press on an icon now starts a potential
drag and release decides which it was, using a 4px movement threshold that
latches once exceeded. Double-click mode goes through the same path, so both
modes now drag identically.
The lock screen drew no cursor. The cursor push in the udev render loop sits
inside `if !locked`, and a locked head renders only the lock element list, so
nothing drew a pointer - and on a bare TTY nothing else does. The on-screen
keyboard's clicks were being handled correctly the whole time
(native_lock_click); they simply could not be aimed. The pointer is now
prepended to the lock element list, above the UI it is used to click.
The password field's opaque panel is gone. New LockConfig::box_opacity,
default 0.0: no fill, no border, no rounded rectangle, just the dots and
status text over the blurred background. Raising it restores the panel at
that opacity for anyone who wants a solid field. Drawing text on a
transparent surface needed a new blit_glyph_over: the existing blit_glyph
blends against one flat opaque colour and writes alpha 255, which would have
turned every glyph into a block of the assumed background - the same box
with its middle removed.
VERIFICATION STATUS, stated plainly: all three are code-complete and the
suite passes, but none is confirmed on screen. The nested backend's capture
pass does not draw the desktop icon grid (a gap already recorded in
winit/capture.rs), so the icon drag cannot be checked by screenshot there,
and aiming blind is what this project's own rules forbid. The two lock
changes were not visually checked either.
515 tests pass, clippy clean.
Diffstat (limited to 'crates/core/src')
| -rw-r--r-- | crates/core/src/lock_config.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/crates/core/src/lock_config.rs b/crates/core/src/lock_config.rs index 92ba0d0..15e4637 100644 --- a/crates/core/src/lock_config.rs +++ b/crates/core/src/lock_config.rs @@ -18,6 +18,21 @@ #[derive(Debug, Clone, PartialEq)] pub struct LockConfig { pub box_bg: (u8, u8, u8), + /// How opaque the password box's own panel is, `0.0`-`1.0`. + /// + /// `0.0` by default: no panel, no border, no rounded rectangle - just + /// the password dots and status text over whatever the lock background + /// already is (the blurred wallpaper, or whatever the user set). + /// Reported live as "there is still a weird box where password is + /// typed. should just be the blurred background or whatever user set. + /// not that horrendus box". + /// + /// Raising it brings the panel back at that opacity, using `box_bg` + /// and `box_border` as before, for anyone who wants a solid field to + /// type into. It is a float rather than a bool so a faint scrim - the + /// usual compromise when a wallpaper is too busy to read text against + /// - is reachable without a second setting. + pub box_opacity: f32, pub box_border: (u8, u8, u8), pub text_color: (u8, u8, u8), pub error_color: (u8, u8, u8), @@ -59,6 +74,7 @@ impl Default for LockConfig { fn default() -> Self { Self { box_bg: (0x2e, 0x34, 0x40), // Nord dark, matches ThemeConfig::titlebar_bg + box_opacity: 0.0, // no panel at all - see the field's own doc comment box_border: (0x88, 0xc0, 0xd0), // Nord blue, matches ThemeConfig::default_border_color text_color: (0xec, 0xef, 0xf4), // Nord light error_color: (0xbf, 0x61, 0x6a), // Nord red, matches the theme's own `error` colour |