mirror of
https://github.com/storytold/wordcraft.git
synced 2026-10-27 03:47:09 -06:00
* Linux: the display theme asks the desktop, not winit winit reports no system theme on Linux — `ActiveEventLoop::system_theme()` is `None` there on every desktop — so "Use system setting" never saw the desktop's choice and fell back to light. A new `desktop_theme` module asks the XDG Desktop Portal's Settings interface for `org.gnome.desktop.interface color-scheme` on a thread of its own, so no D-Bus call is ever made from the frame loop, and the app follows the answer, including a change made while it runs. The colour scheme is asked for under its GNOME schema name first, which GNOME's portal and XFCE's both answer, then under the older freedesktop one, which KDE answers. A desktop that answers neither leaves the user's own choice alone, exactly as before. macOS and Windows are untouched: winit answers there. * Review fixes for #298: one D-Bus connection; watcher started by the app - The watcher keeps one session-bus connection for its lifetime instead of opening a new one every 4 s; a connection whose calls all fail is dropped and reopened on the next poll. - WordApp::new no longer starts the watcher. The desktop app calls WordApp::watch_desktop_theme at start-up, so unit tests, kittest and ui_shot don't spawn D-Bus pollers and what they draw doesn't depend on the host's desktop theme (test: a_new_app_does_not_watch_the_desktop). - A change wakes the window (request_repaint), so an idle app follows a theme switch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Test: name the empty Vec's type (a new dependency adds a PartialEq impl for char) --------- Co-authored-by: GyuriX <gyurix@users.noreply.github.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>