srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/crates/wayland/src/winit/connect.rs
diff options
context:
space:
mode:
authorsrdusr <[email protected]>2025-08-17 01:54:00 +0200
committersrdusr <[email protected]>2025-08-17 01:54:00 +0200
commitb8376bd631a72f7484c24663699a7d4c813f600e (patch)
treec8c84725e3c66598df3f619dd96aa69b6eede26e /crates/wayland/src/winit/connect.rs
parentbd6aadf4d166c05f22f1ab6cdfe2e815e071f162 (diff)
downloadsrdwm-b8376bd631a72f7484c24663699a7d4c813f600e.tar.gz
srdwm-b8376bd631a72f7484c24663699a7d4c813f600e.zip
Fix desktop icons v1 regressions: bar overlap, wrong order; add proper menus
Live testing found v1 genuinely broken, not just rough: 1. Icons weren't rendering reliably at all - ensure_desktop_icons only ever computed the grid's origin once, on whichever render pass happened to be first. AGS's own top bar registers its exclusive zone after that first pass, so origin got permanently baked in at the pre-bar geometry. Confirmed live via a temporary diagnostic log. Fixed by re-deriving origin from the primary monitor's current geometry on every call instead of just the first. 2. Fixed icons (Home/Computer/Trash) always sorted before real files -- confirmed wrong via direct question. The whole list now sorts alphabetically by label, case-insensitive, fixed icons included. 3. "Set as Wallpaper" was the wrong feature: removed entirely (DesktopMenuAction::SetWallpaper, general.wallpaper_command, is_image_path). The user wants that handled by their real file manager once opened, not reimplemented here. Also adds real menu functionality per "where are all the options": Rename (inline text edit, new CompState::renaming_icon field and keyboard redirect mirroring NativeLock::password's existing precedent), Delete (moves to ~/.local/share/Trash per the freedesktop.org spec, new trash.rs module, same-filesystem case, no confirmation - this is the reversible move-to-trash, not a permanent delete), Empty Trash on the Trash icon, and Open Terminal Here / Open in File Manager on the bare-desktop menu (new general.terminal config key). 133 wayland-crate tests (up from 106), full workspace build and clippy clean.
Diffstat (limited to 'crates/wayland/src/winit/connect.rs')
-rw-r--r--crates/wayland/src/winit/connect.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/wayland/src/winit/connect.rs b/crates/wayland/src/winit/connect.rs
index 227cf33..140dc58 100644
--- a/crates/wayland/src/winit/connect.rs
+++ b/crates/wayland/src/winit/connect.rs
@@ -157,6 +157,7 @@ impl WaylandPlatform {
desktop_menu: None,
desktop_menu_buffer: None,
last_icon_click: None,
+ renaming_icon: None,
wm: wm.clone(),
surface_to_id: HashMap::new(),
id_to_window: HashMap::new(),