Refresh without title changes
Window content can change while its title stays the same. Request::Refresh and PluginResponse::Update make content refresh explicit rather than dependent on title notifications.
Two complementary upstream contributions connect Wayland window capture in the launcher service with thumbnail rendering in COSMIC's Rust/Iced interface. The code was tested locally; both pull requests remain open.
The problem
A useful window switcher should help identify windows visually, even when multiple windows have similar titles. COSMIC's launcher and frontend live in separate repositories, and window content can change without a corresponding title update.
The change therefore needed a capture path, a portable data representation, asynchronous result updates, and an interface that stays responsive while images are loading.
Architecture
A simplified sequence based on the two submitted implementations, not a screenshot or an invented UI.
The cosmic_toplevel plugin requests foreign toplevel screenshots through COSMIC's Wayland screencopy protocol.
Captured shared-memory buffers are transformed into resized RGBA thumbnails and cached by window identifier.
Thumbnail data is attached to launcher search results. Updated results can be published asynchronously through the plugin protocol.
The Rust/Iced Alt-Tab interface loads image handles and requests one refresh pass when the switcher opens.
Engineering decisions
Window content can change while its title stays the same. Request::Refresh and PluginResponse::Update make content refresh explicit rather than dependent on title notifications.
Refreshing once per Alt-Tab opening updates previews without capturing windows continuously while the switcher is visible.
Loading placeholders, cache invalidation and closed-window cleanup account for screenshots arriving asynchronously or becoming obsolete.
pop-os/launcher · #291
Screencopy, SHM-to-RGBA conversion, per-window caching and protocol extensions for explicit request/response updates.
pop-os/cosmic-launcher · #435
Thumbnail model and provider, Iced image handles, Alt-Tab presentation, invalidation and a single refresh per opening.
Validation
The test scenarios below are documented in the upstream pull request descriptions.
The PRs document formatting, compilation and test commands in each workspace. This page does not claim an upstream merge or production rollout.
Review and source
Both PRs are publicly reviewable. Their descriptions contain the change lists, test commands and observed behaviors. A real screen recording may be added here later; the architecture above intentionally makes no claim to be a capture.