From cc22fe69a68e0fff027d833029aea850976488c8 Mon Sep 17 00:00:00 2001 From: srdusr <99972264+srdusr@users.noreply.github.com> Date: Fri, 15 Aug 2025 23:22:00 +0200 Subject: Add real desktop icons plus right-click desktop/icon context menus Closes "right-click on bare desktop" - previously a true no-op, nothing rendered above the wallpaper at all. Requested directly: a real desktop "just like windows does" - Home/Computer/Trash plus one icon per real ~/Desktop entry, individually draggable with persisted grid positions, double-click to open, right-click menus (per-icon "Open" plus "Set as Wallpaper" for image files when general.wallpaper_command is set; bare desktop "New Folder"/"Refresh"). Architecture mirrors the existing context_menu.rs/snap_flyout.rs "compositor-owned floating UI" pattern: desktop_icons.rs (data model, grid layout, filesystem scan, hit-test), desktop_icons_state.rs (JSON persistence, same shape as monitor_layout.rs), desktop_menu.rs (the new right-click menu, reusing decoration::render_context_menu's existing rasterizer), state/desktop_icons.rs (CompState glue: rescan/select/drag/ open/persist), and a new decoration::render_desktop_icon rasterizer -- hand-drawn glyphs, since no PNG/SVG decoding capability exists anywhere in this workspace. Wired into both render loops (udev and winit) above the wallpaper and below every window, and into input/pointer.rs's button/ motion handlers for selection, drag, double-click, and both menus. Four new config keys: general.desktop_icons (default true - a directly requested, purely visual feature, unlike the opt-in-while-experimental general.gpu), general.file_manager, general.desktop_icon_single_click, general.wallpaper_command (all default off/empty). Deliberately out of scope for this pass, stated up front: move-to-trash and "Empty Trash" (destructive, no confirmation-dialog primitive to gate them on yet), filesystem watching, multi-select, per-mimetype icon art, icons on any monitor but the primary one. 124 wayland-crate tests (up from 106), full workspace build and clippy clean. --- docs/TODO.md | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) (limited to 'docs/TODO.md') diff --git a/docs/TODO.md b/docs/TODO.md index 4201375..1de3cee 100644 --- a/docs/TODO.md +++ b/docs/TODO.md @@ -13,6 +13,36 @@ that has the full story. Keep this list current as items close or open; update the source doc's own entry too, don't let this drift into a second stale copy the way `PANEL_SUPPORT_TODO.md` did. +## Feature, implemented: real desktop icons plus the right-click desktop/icon menus (2026-08-25) + +Closes the "Right-click on bare desktop" item that used to sit under +"Explicitly requested, not yet started" - previously a true no-op +(`_ => {}` in `input/pointer.rs`'s button handler), nothing rendered above +the wallpaper at all. Follow-up request, asked directly: real desktop +icons "just like windows does" - Home/Computer/Trash plus one per real +`~/Desktop` entry, draggable, right-click menus, a New Folder action, and +(a later addition to the same round) a "Set as Wallpaper" action for +image files. + +Built as the sibling of the existing `context_menu.rs`/`snap_flyout.rs` +"compositor-owned floating UI" pattern - see `desktop_icons.rs`'s and +`desktop_menu.rs`'s own module doc comments for the full architecture. +Four new config keys (`general.desktop_icons`, default `true`; +`general.file_manager`, `general.desktop_icon_single_click`, `general. +wallpaper_command`, all default off/empty) - see DEFAULTS.md's own +"Desktop icons" section for the complete behavior writeup. + +Deliberately cut from this pass, stated up front rather than discovered +later: no move-to-trash and no "Empty Trash" (both destructive/hard-to- +reverse with no confirmation-dialog primitive to gate them on yet), no +filesystem watching (manual "Refresh" or a restart picks up an externally +added file), no multi-select, no per-mimetype icon art, icons on the +primary monitor only. + +Built, `cargo test --workspace` (124 wayland-crate tests, up from 106) and +`cargo clippy --workspace --all-targets` clean; installed, pending a live +restart to confirm. + ## Real bug, root-caused and fixed: a resize's own rapid-fire commits could get a window's rounded-corner content mask cached as blank, hiding real content until the next real content change (2026-08-25) Reported live: "terminal output/everything disappears when i sometimes resize terminal." `general.rounded_corners = true` in this machine's own live config, so the udev/Pixman content-masking path (`rounded_corners_pixman.rs`) is what's actually in play, not just a rarely-hit opt-in. @@ -1527,8 +1557,6 @@ persists. environment to confirm live. Needs an actual physical click test. ## Explicitly requested, not yet started -- [ ] **Right-click on bare desktop** - no handler exists at all - currently; requested, scope/design never discussed. - [ ] **Window-management-policy comparison vs. GlazeWM, Awesome, Openbox, RagnarWM** - all four cloned to `~/reference-wms/` and ready; the *rendering* comparison used niri and mutter (the only -- cgit v1.2.3