srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/crates/wayland/src/udev
diff options
context:
space:
mode:
authorsrdusr <[email protected]>2025-11-20 17:10:00 +0200
committersrdusr <[email protected]>2025-11-20 17:10:00 +0200
commitae47a562bd423df856ec6c735d9e4c29a8e1e3c6 (patch)
tree6fa732650b8809d0c302017fbc72254c66bccc02 /crates/wayland/src/udev
parent04466601f4714dcbc1f3b0ef134febede6febb6a (diff)
downloadsrdwm-ae47a562bd423df856ec6c735d9e4c29a8e1e3c6.tar.gz
srdwm-ae47a562bd423df856ec6c735d9e4c29a8e1e3c6.zip
Redesign the native lock screen: clock/avatar header, on-screen keyboard, wrong-password shake
The native lock UI was a flat bordered rectangle with three left-aligned text lines and no shadow, clock, or identity marker - reported directly as looking unfinished. Splits the redesign across a new transparent-canvas header (time, date, circular avatar, username) above a redesigned, centered password box with a real drop shadow and a dimmed placeholder prompt, plus a genuine on-screen QWERTY-shaped keyboard with working Shift/Backspace/Return/Space and real click hit-testing shared with the render path via one `lock_stack_layout` function, and a damped-sine shake on a failed attempt. LockConfig gains show_clock/show_keyboard/avatar_bg, each independently srd.set-able and documented in a new theme.lock.* section in DEFAULTS.md. native_lock_render_elements now takes one NativeLockFrame struct instead of positional buffer arguments now that it composites five optional layers instead of two. Full workspace build/test/clippy clean (152 wayland tests, +6 new).
Diffstat (limited to 'crates/wayland/src/udev')
-rw-r--r--crates/wayland/src/udev/render.rs14
1 files changed, 13 insertions, 1 deletions
diff --git a/crates/wayland/src/udev/render.rs b/crates/wayland/src/udev/render.rs
index 0280e87..b435276 100644
--- a/crates/wayland/src/udev/render.rs
+++ b/crates/wayland/src/udev/render.rs
@@ -243,6 +243,10 @@ impl CompState {
let native_bg = self.native_lock_background(&output.name()).cloned();
let native_ui = self.native_lock_ui().map(|(buf, size)| (buf.clone(), size));
let native_needs_capture = self.native_lock_needs_capture(&output.name());
+ let native_header = self.native_lock_header().map(|(buf, size)| (buf.clone(), size));
+ let native_shadow = self.native_lock_shadow().cloned();
+ let native_keyboard = self.native_lock_keyboard().map(|(buf, size)| (buf.clone(), size));
+ let native_shake_offset = self.native_lock_shake_offset();
// Content/decoration elements are built per head: both need the
// renderer, and geometry is translated into head-local space.
@@ -1102,7 +1106,15 @@ impl CompState {
};
let native_elements = if locked && is_native {
let size = udev.heads[index].size;
- crate::native_lock::native_lock_render_elements(native_bg.as_ref(), native_ui.as_ref().map(|(b, s)| (b, *s)), size, &mut udev.renderer)
+ let frame = crate::native_lock::NativeLockFrame {
+ background: native_bg.as_ref(),
+ header: native_header.as_ref().map(|(b, s)| (b, *s)),
+ shadow: native_shadow.as_ref(),
+ ui: native_ui.as_ref().map(|(b, s)| (b, *s)),
+ keyboard: native_keyboard.as_ref().map(|(b, s)| (b, *s)),
+ shake_offset: native_shake_offset,
+ };
+ crate::native_lock::native_lock_render_elements(frame, size, &mut udev.renderer)
} else {
Vec::new()
};