<feed xmlns='http://www.w3.org/2005/Atom'>
<title>srdwm/crates/wayland/src/trash.rs, branch main</title>
<subtitle>Cross-platform window manager written in Rust.
</subtitle>
<id>https://srdusr.com/git/srdwm/atom?h=main</id>
<link rel='self' href='https://srdusr.com/git/srdwm/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://srdusr.com/git/srdwm/'/>
<updated>2025-08-16T23:54:00+00:00</updated>
<entry>
<title>Fix desktop icons v1 regressions: bar overlap, wrong order; add proper menus</title>
<updated>2025-08-16T23:54:00+00:00</updated>
<author>
<name>srdusr</name>
<email>99972264+srdusr@users.noreply.github.com</email>
</author>
<published>2025-08-16T23:54:00+00:00</published>
<link rel='alternate' type='text/html' href='https://srdusr.com/git/srdwm/commit/?id=b8376bd631a72f7484c24663699a7d4c813f600e'/>
<id>urn:sha1:b8376bd631a72f7484c24663699a7d4c813f600e</id>
<content type='text'>
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.
</content>
</entry>
</feed>
