mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-10 10:10:34 -06:00
On a Wayland session dropping a file on the window does nothing: winit 0.30 (eframe 0.36) has no Wayland drag and drop (#386). The only way out was launching with `WAYLAND_DISPLAY= photocraft`. Add Preferences › Performance › Linux display server (auto | x11, applies at next launch), direction 2 in #386. With x11, main.rs asks winit for its X11 backend through eframe's event_loop_builder hook (EventLoopBuilderExtX11::with_x11), so the window runs through XWayland and drops work. No environment is modified (no unsafe). It only applies when an X server is reachable (DISPLAY set); otherwise winit's default is kept, so a missing XWayland can't stop the app from starting. Other platforms ignore it. The Wayland drop notice now points at the preference instead of the environment variable (all catalogs updated). Tests: the startup reader (x11, auto, unknown value, wrong type, broken JSON, missing file), the notice text, prefs_usage, label translations. Verified on KDE Plasma 6 Wayland: with x11 the window is an X11 window (XWayland) and dropping a NEF from Dolphin opens it.