Compare commits

...
Author SHA1 Message Date
Claude 6a70740840 Linux display server: compile read_display_server on Linux (and tests) only
macOS and Windows clippy rejected it as dead code (-D warnings): its only caller in main.rs is
#[cfg(target_os = "linux")]. Also puts read_rendering_prefs' doc line back above it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UHgFEHEsefoQoBParH47JA
2026-10-09 08:33:03 +00:00
Claude 2af78fea23 scorecard: regenerate for the display-server preference (141 settings)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UHgFEHEsefoQoBParH47JA
2026-10-09 08:32:09 +00:00
Gert Pellin 42f650884c Linux: display server preference (X11 / XWayland) so file drops work
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.
2026-10-09 08:31:45 +00:00
20 changed files with 116 additions and 3 deletions

No files matched your search

+32
View File
@@ -408,6 +408,17 @@ impl Sentinel {
}
}
/// The Linux display-server preference (`performance.linuxDisplayServer`) from the preferences
/// file, read before the window opens; `Auto` when the file or value is missing or unknown.
#[cfg(any(target_os = "linux", test))]
pub fn read_display_server(path: Option<&Path>) -> photocraft_engine::prefs::LinuxDisplayServer {
let v: Value = path.and_then(|p| std::fs::read_to_string(p).ok()).and_then(|t| serde_json::from_str(&t).ok()).unwrap_or(Value::Null);
v.get("performance")
.and_then(|p| serde_json::from_value::<photocraft_engine::prefs::Performance>(p.clone()).ok())
.map(|performance| performance.linux_display_server)
.unwrap_or_default()
}
/// Read the policy leniently at startup, including old settings without renderingMode.
pub fn read_rendering_prefs(path: Option<&Path>) -> (GpuBackend, RenderingMode) {
let v: Value = path.and_then(|p| std::fs::read_to_string(p).ok()).and_then(|t| serde_json::from_str(&t).ok()).unwrap_or(Value::Null);
@@ -428,6 +439,27 @@ mod tests {
Marker { backend: backend.into(), adapter: "Intel(R) UHD Graphics".into(), adapter_backend: adapter_backend.into(), ..Default::default() }
}
#[test]
fn display_server_preference_is_read_before_the_window_opens() {
use photocraft_engine::prefs::LinuxDisplayServer;
let dir = std::env::temp_dir().join(format!("photocraft-display-server-{}", std::process::id()));
std::fs::create_dir_all(&dir).unwrap();
let file = dir.join("preferences.json");
let read = |json: &str| {
std::fs::write(&file, json).unwrap();
read_display_server(Some(&file))
};
assert_eq!(read(r#"{"performance":{"linuxDisplayServer":"x11"}}"#), LinuxDisplayServer::X11);
assert_eq!(read(r#"{"performance":{"linuxDisplayServer":"auto","gpuBackend":"vulkan"}}"#), LinuxDisplayServer::Auto);
// Unknown values, other types, broken JSON and a missing file all start as Auto.
assert_eq!(read(r#"{"performance":{"linuxDisplayServer":"wayland"}}"#), LinuxDisplayServer::Auto);
assert_eq!(read(r#"{"performance":{"linuxDisplayServer":11}}"#), LinuxDisplayServer::Auto);
assert_eq!(read("{not json"), LinuxDisplayServer::Auto);
assert_eq!(read_display_server(Some(&dir.join("missing.json"))), LinuxDisplayServer::Auto);
assert_eq!(read_display_server(None), LinuxDisplayServer::Auto);
let _ = std::fs::remove_dir_all(&dir);
}
#[test]
fn cpu_policy_ignores_hardware_backend_override() {
let p = plan_with_mode(Vulkan, RenderingMode::Cpu, None, Some("vulkan"), false, Os::Windows);
+14
View File
@@ -209,6 +209,20 @@ fn main() -> eframe::Result {
// app no pen input (#639).
#[cfg(target_os = "linux")]
let session = tablet::display_session();
// Preferences › Performance › Linux display server = X11: Xwayland on a Wayland session too,
// where native file drops work (winit 0.30 has none on Wayland, #386). Only when Xwayland can
// run the window ($DISPLAY set, X11 libraries installed); otherwise the session's own.
#[cfg(target_os = "linux")]
let session = if session == linux_libs::DisplaySession::Wayland
&& gpu_startup::read_display_server(services::prefs_file().as_deref()) == photocraft_engine::prefs::LinuxDisplayServer::X11
&& std::env::var_os("DISPLAY").is_some_and(|d| !d.is_empty())
&& linux_libs::available(linux_libs::DisplaySession::X11)
{
eprintln!("photocraft: opening the window through Xwayland (Preferences › Performance › Linux display server)");
linux_libs::DisplaySession::X11
} else {
session
};
// winit and wgpu dlopen the windowing and GPU libraries, and some of those crates panic when
// one is missing (issue #201). Name the package to install and exit instead.
+17 -1
View File
@@ -71,6 +71,14 @@ choice!(
/// CPU disables image acceleration; the native window may still need hardware graphics.
RenderingMode { Auto = "auto", Gpu = "gpu", Cpu = "cpu" } default Auto
);
choice!(
/// Linux display server of the desktop app's window (applies at next launch). `x11` runs
/// PhotoCraft through XWayland on a Wayland session, where native file drag and drop works
/// (winit 0.30 has none on Wayland, issue #386); fractional scaling may then look softer.
/// It needs an X server (`DISPLAY`); without one PhotoCraft starts as `auto`. Other
/// platforms ignore it.
LinuxDisplayServer { Auto = "auto", X11 = "x11" } default Auto
);
choice!(UiFontSize { Tiny = "tiny", Small = "small", Medium = "medium", Large = "large" } default Small);
choice!(LogDestination { Metadata = "metadata", TextFile = "textFile", Both = "both" } default Metadata);
choice!(LogDetail { SessionsOnly = "sessionsOnly", Concise = "concise", Detailed = "detailed" } default Concise);
@@ -412,6 +420,8 @@ pub struct Performance {
/// sliders while they drag) render on a reduced copy: fast, but blocky when zoomed in. Off:
/// they render at full resolution.
pub low_resolution_previews: bool,
/// Linux display server (applies at next launch; see [`LinuxDisplayServer`]).
pub linux_display_server: LinuxDisplayServer,
/// Memory budget of the layer-effect cache, in MB.
pub effect_cache_mb: u32,
pub legacy_compositing: bool,
@@ -441,6 +451,7 @@ impl Default for Performance {
rendering_mode: None,
gpu_backend: GpuBackend::Auto,
low_resolution_previews: true,
linux_display_server: LinuxDisplayServer::Auto,
effect_cache_mb: 768,
legacy_compositing: false,
}
@@ -879,9 +890,13 @@ pub const HIDDEN_UNTIL_IMPLEMENTED: &[&str] = &[
/// Is the preference at `path` (`"section.key"`) hidden from the Preferences dialog?
pub fn is_hidden(path: &str) -> bool {
HIDDEN_UNTIL_IMPLEMENTED.contains(&path)
HIDDEN_UNTIL_IMPLEMENTED.contains(&path) || (!cfg!(target_os = "linux") && LINUX_ONLY.contains(&path))
}
/// Preferences that only do something on Linux; the dialog doesn't show them elsewhere. They
/// still load, save and round-trip on every platform.
pub const LINUX_ONLY: &[&str] = &["performance.linuxDisplayServer"];
/// Choices of an enumerated preference (dotted path, e.g. `"cursors.painting"`).
pub fn choices(path: &str) -> Option<&'static [&'static str]> {
Some(match path {
@@ -913,6 +928,7 @@ pub fn choices(path: &str) -> Option<&'static [&'static str]> {
"rawDefaults.bitDepth" => RawDepth::NAMES,
"rawDefaults.sharpenFor" => RawSharpen::NAMES,
"performance.gpuBackend" => GpuBackend::NAMES,
"performance.linuxDisplayServer" => LinuxDisplayServer::NAMES,
"performance.renderingMode" => RenderingMode::NAMES,
_ => return None,
})
+7
View File
@@ -363,3 +363,10 @@ fn gpu_backend_round_trips_and_validates() {
assert_eq!(GpuBackend::parse(n).map(GpuBackend::name), Some(*n));
}
}
#[test]
fn linux_only_preferences_show_only_on_linux() {
assert_eq!(is_hidden("performance.linuxDisplayServer"), !cfg!(target_os = "linux"));
assert!(!is_hidden("performance.gpuBackend"));
assert!(LINUX_ONLY.iter().all(|p| choices(p).is_some()), "every Linux-only preference is a real one");
}
+3
View File
@@ -996,6 +996,7 @@
Native file drag-and-drop is unavailable Nativní přetahování souborů ve Waylandu není dostupné
Native file drag-and-drop is not supported on Wayland yet. Use File › Open, or copy the image in your file manager and paste it with {paste}. Nativní přetahování souborů ve Waylandu zatím není podporováno. Použijte Soubor › Otevřít, nebo obrázek zkopírujte ve správci souborů a vložte ho pomocí {paste}.
To drop files, start PhotoCraft under XWayland: `{command}` Chcete-li soubory přetahovat, spusťte PhotoCraft v XWayland: `{command}`
Or set Preferences › Performance › Linux display server to X11: PhotoCraft then always starts under XWayland. Nebo nastavte Předvolby › Výkon › Zobrazovací server Linuxu na X11: PhotoCraft se pak vždy spustí v XWayland.
Edit › Paste Úpravy › Vložit
Duplicate Layers… Duplikovat vrstvy…
Duplicate style Duplikovat styl
@@ -2028,6 +2029,8 @@
CPU (no GPU acceleration) CPU (bez akcelerace GPU)
DirectX 12 DirectX 12
GPU backend Grafický backend
Linux display server Zobrazovací server Linuxu
X11 X11
Metal Metal
OpenGL OpenGL
Use tablet pressure Použít přítlak tabletu
Can't render this file because it contains an unexpected character in line 6 and column 47.
+3
View File
@@ -980,6 +980,7 @@
Native file drag-and-drop is unavailable Natives Ziehen und Ablegen von Dateien ist nicht verfügbar
Native file drag-and-drop is not supported on Wayland yet. Use File › Open, or copy the image in your file manager and paste it with {paste}. Natives Ziehen und Ablegen von Dateien wird unter Wayland noch nicht unterstützt. Nutze Datei › Öffnen oder kopiere das Bild im Dateimanager und füge es mit {paste} ein.
To drop files, start PhotoCraft under XWayland: `{command}` Um Dateien abzulegen, starte PhotoCraft unter XWayland: `{command}`
Or set Preferences › Performance › Linux display server to X11: PhotoCraft then always starts under XWayland. Oder stelle Voreinstellungen › Leistung › Linux-Anzeigeserver auf X11: PhotoCraft startet dann immer unter XWayland.
Edit › Paste Bearbeiten › Einfügen
Duplicate Layers… Ebenen duplizieren…
Duplicate style Stil duplizieren
@@ -2001,6 +2002,8 @@
CPU (no GPU acceleration) CPU (keine GPU-Beschleunigung)
DirectX 12 DirectX 12
GPU backend GPU-Backend
Linux display server Linux-Anzeigeserver
X11 X11
Metal Metal
OpenGL OpenGL
Use tablet pressure Tablettdruck verwenden
Can't render this file because it contains an unexpected character in line 6 and column 47.
+3
View File
@@ -1040,6 +1040,8 @@
Keep Using CPU Συνέχεια με CPU
Retry GPU Νέα προσπάθεια χρήσης GPU
GPU Backend Σύστημα GPU
Linux display server Διακομιστής οθόνης Linux
X11 X11
Full-resolution preview unavailable Δεν είναι διαθέσιμη προεπισκόπηση πλήρους ανάλυσης
No patterns Δεν υπάρχουν μοτίβα
Enable {name} Ενεργοποίηση: {name}
@@ -3332,6 +3334,7 @@ cameraRaw Yellow Κίτρινο
Seafoam Θαλασσί
Srgb sRGB
To drop files, start PhotoCraft under XWayland: `{command}` Για να αποθέσετε αρχεία, εκκινήστε το PhotoCraft μέσω XWayland: `{command}`
Or set Preferences › Performance › Linux display server to X11: PhotoCraft then always starts under XWayland. Ή ορίστε Προτιμήσεις › Επιδόσεις › Διακομιστής οθόνης Linux σε X11: το PhotoCraft θα εκκινεί τότε πάντα μέσω XWayland.
Vulkan Vulkan
WebP (lossless) WebP (χωρίς απώλειες)
Webp WebP
Can't render this file because it contains an unexpected character in line 960 and column 18.
+3
View File
@@ -981,6 +981,7 @@
Native file drag-and-drop is unavailable El arrastrar y soltar archivos de forma nativa no está disponible en Wayland
Native file drag-and-drop is not supported on Wayland yet. Use File › Open, or copy the image in your file manager and paste it with {paste}. El arrastrar y soltar archivos de forma nativa aún no está disponible en Wayland. Usa Archivo › Abrir, o copia la imagen en tu gestor de archivos y pégala con {paste}.
To drop files, start PhotoCraft under XWayland: `{command}` Para soltar archivos, inicia PhotoCraft bajo XWayland: `{command}`
Or set Preferences › Performance › Linux display server to X11: PhotoCraft then always starts under XWayland. O establece Preferencias › Rendimiento › Servidor de pantalla de Linux en X11: PhotoCraft se iniciará siempre bajo XWayland.
Edit › Paste Edición › Pegar
Duplicate Layers… Duplicar capas…
Duplicate style Duplicar estilo
@@ -2013,6 +2014,8 @@
CPU (no GPU acceleration) CPU (sin aceleración por GPU)
DirectX 12 DirectX 12
GPU backend Backend de GPU
Linux display server Servidor de pantalla de Linux
X11 X11
Metal Metal
OpenGL OpenGL
Use tablet pressure Usar la presión de la tableta
Can't render this file because it contains an unexpected character in line 4 and column 47.
+3
View File
@@ -1981,6 +1981,8 @@
CPU (no GPU acceleration) CPU (sans accélération GPU)
DirectX 12 DirectX 12
GPU backend Moteur GPU
Linux display server Serveur d'affichage Linux
X11 X11
Metal Metal
OpenGL OpenGL
Use tablet pressure Utiliser la pression de la tablette
@@ -2471,6 +2473,7 @@
Native file drag-and-drop is unavailable Le glisser-déposer natif de fichiers n'est pas disponible
Native file drag-and-drop is not supported on Wayland yet. Use File › Open, or copy the image in your file manager and paste it with {paste}. Le glisser-déposer natif de fichiers n'est pas encore pris en charge sous Wayland. Utilisez Fichier › Ouvrir, ou copiez l'image dans votre gestionnaire de fichiers et collez-la avec {paste}.
To drop files, start PhotoCraft under XWayland: `{command}` Pour déposer des fichiers, lancez PhotoCraft sous XWayland : `{command}`
Or set Preferences › Performance › Linux display server to X11: PhotoCraft then always starts under XWayland. Ou réglez Préférences › Performances › Serveur d'affichage Linux sur X11 : PhotoCraft démarre alors toujours sous XWayland.
Edit › Paste Édition › Coller
Use File › Open, or paste a copied image with {paste}. Utilisez Fichier › Ouvrir, ou collez une image copiée avec {paste}.
Mixer Brush Tool Outil Pinceau mélangeur
Can't render this file because it contains an unexpected character in line 6 and column 47.
+3
View File
@@ -1975,6 +1975,8 @@
CPU (no GPU acceleration) CPU (tanpa akselerasi GPU)
DirectX 12 DirectX 12
GPU backend Backend GPU
Linux display server Server tampilan Linux
X11 X11
Metal Metal
OpenGL OpenGL
Use tablet pressure Pakai tekanan tablet
@@ -2460,6 +2462,7 @@
Native file drag-and-drop is unavailable Seret dan lepas berkas native tidak tersedia
Native file drag-and-drop is not supported on Wayland yet. Use File › Open, or copy the image in your file manager and paste it with {paste}. Seret dan lepas berkas native belum didukung di Wayland. Gunakan Berkas › Buka, atau salin gambar di pengelola berkas lalu tempel dengan {paste}.
To drop files, start PhotoCraft under XWayland: `{command}` Untuk menjatuhkan berkas, jalankan PhotoCraft di XWayland: `{command}`
Or set Preferences › Performance › Linux display server to X11: PhotoCraft then always starts under XWayland. Atau atur Preferensi › Performa › Server tampilan Linux ke X11: PhotoCraft lalu selalu berjalan di XWayland.
Edit › Paste Edit › Tempel
Use File › Open, or paste a copied image with {paste}. Gunakan Berkas › Buka, atau tempel gambar yang disalin dengan {paste}.
Mixer Brush Tool Alat Kuas Pencampur
Can't render this file because it contains an unexpected character in line 4 and column 47.
+3
View File
@@ -980,6 +980,7 @@
Native file drag-and-drop is unavailable Il drag-and-drop nativo file non è disponibile su Wayland
Native file drag-and-drop is not supported on Wayland yet. Use File › Open, or copy the image in your file manager and paste it with {paste}. Il drag-and-drop nativo non è ancora supportato su Wayland. Usa File › Apri, oppure copia l'immagine nel file manager e incollala con {paste}.
To drop files, start PhotoCraft under XWayland: `{command}` Per trascinare file, avvia PhotoCraft sotto XWayland: `{command}`
Or set Preferences › Performance › Linux display server to X11: PhotoCraft then always starts under XWayland. Oppure imposta Preferenze › Prestazioni › Server grafico Linux su X11: PhotoCraft partirà sempre sotto XWayland.
Edit › Paste Modifica › Incolla
Duplicate Layers… Duplica livelli…
Duplicate style Duplica stile
@@ -2011,6 +2012,8 @@
CPU (no GPU acceleration) CPU (nessuna accelerazione GPU)
DirectX 12 DirectX 12
GPU backend Backend GPU
Linux display server Server grafico Linux
X11 X11
Metal Metal
OpenGL OpenGL
Use tablet pressure Usa pressione tavoletta
1 # Italian (it) catalog. Columns, separated by a TAB: context <TAB> source <TAB> translation
980
981
982
983
984
985
986
2012
2013
2014
2015
2016
2017
2018
2019
+3
View File
@@ -986,6 +986,7 @@
Native file drag-and-drop is unavailable Wayland ではネイティブのファイルドラッグ&ドロップを利用できません
Native file drag-and-drop is not supported on Wayland yet. Use File › Open, or copy the image in your file manager and paste it with {paste}. Wayland ではネイティブのファイルドラッグ&ドロップはまだ利用できません。[ファイル › 開く] を使うか、ファイルマネージャーで画像をコピーして {paste} で貼り付けてください。
To drop files, start PhotoCraft under XWayland: `{command}` ファイルをドロップするには、XWayland 上で PhotoCraft を起動してください: `{command}`
Or set Preferences › Performance › Linux display server to X11: PhotoCraft then always starts under XWayland. または 環境設定 › パフォーマンス › Linux ディスプレイサーバー を X11 にすると、PhotoCraft は常に XWayland 上で起動します。
Edit › Paste [編集 › 貼り付け]
Duplicate Layers… レイヤーを複製…
Duplicate style スタイルを複製
@@ -2019,6 +2020,8 @@
CPU (no GPU acceleration) CPU(GPU アクセラレーションなし)
DirectX 12 DirectX 12
GPU backend GPU バックエンド
Linux display server Linux ディスプレイサーバー
X11 X11
Metal Metal
OpenGL OpenGL
Use tablet pressure タブレットの筆圧を使用
Can't render this file because it contains an unexpected character in line 6 and column 47.
+3
View File
@@ -1975,6 +1975,8 @@
CPU (no GPU acceleration) CPU(GPU 가속 없음)
DirectX 12 DirectX 12
GPU backend GPU 백엔드
Linux display server Linux 디스플레이 서버
X11 X11
Metal Metal
OpenGL OpenGL
Use tablet pressure 태블릿 필압 사용
@@ -2001,6 +2003,7 @@
Native file drag-and-drop is unavailable 파일 드래그 앤 드롭을 사용할 수 없습니다
Native file drag-and-drop is not supported on Wayland yet. Use File › Open, or copy the image in your file manager and paste it with {paste}. Wayland에서는 아직 파일 드래그 앤 드롭을 지원하지 않습니다. 파일 › 열기를 사용하거나, 파일 관리자에서 이미지를 복사한 뒤 {paste}(으)로 붙여넣으세요.
To drop files, start PhotoCraft under XWayland: `{command}` 파일을 끌어다 놓으려면 XWayland에서 PhotoCraft를 실행하세요: `{command}`
Or set Preferences › Performance › Linux display server to X11: PhotoCraft then always starts under XWayland. 또는 환경 설정 › 성능 › Linux 디스플레이 서버를 X11로 설정하면 PhotoCraft가 항상 XWayland에서 시작됩니다.
Edit › Paste 편집 › 붙여넣기
Use File › Open, or paste a copied image with {paste}. 파일 › 열기를 사용하거나, 복사한 이미지를 {paste}(으)로 붙여넣으세요.
Invalid {mode} profile 유효하지 않은 {mode} 프로파일
1 # Korean (ko) catalog. UTF-8: context<TAB>English source<TAB>translation.
1975
1976
1977
1978
1979
1980
1981
1982
2003
2004
2005
2006
2007
2008
2009
+3
View File
@@ -2007,6 +2007,8 @@
CPU (no GPU acceleration) CPU (bez akceleracji GPU)
DirectX 12 DirectX 12
GPU backend Backend GPU
Linux display server Serwer wyświetlania Linuksa
X11 X11
Metal Metal
OpenGL OpenGL
Use tablet pressure Użyj nacisku tabletu
@@ -3209,6 +3211,7 @@ cameraRaw Roughness Chropowatość
{path}: the path is not valid Unicode; rename the file and open it again. {path}: ścieżka nie jest prawidłowym Unicode; zmień nazwę pliku i otwórz go ponownie.
Native file drag-and-drop is not supported on Wayland yet. Use File › Open, or copy the image in your file manager and paste it with {paste}. Natywne przeciąganie i upuszczanie plików nie jest jeszcze obsługiwane w Wayland. Użyj Plik › Otwórz albo skopiuj obraz w menedżerze plików i wklej go za pomocą {paste}.
To drop files, start PhotoCraft under XWayland: `{command}` Aby upuszczać pliki, uruchom PhotoCraft pod XWayland: `{command}`
Or set Preferences › Performance › Linux display server to X11: PhotoCraft then always starts under XWayland. Albo ustaw Preferencje › Wydajność › Serwer wyświetlania Linuksa na X11: PhotoCraft będzie wtedy zawsze uruchamiany pod XWayland.
Edit › Paste Edycja › Wklej
Use File › Open, or paste a copied image with {paste}. Użyj Plik › Otwórz albo wklej skopiowany obraz za pomocą {paste}.
Can't render this file because it contains an unexpected character in line 6 and column 47.
+3
View File
@@ -1980,6 +1980,8 @@
CPU (no GPU acceleration) CPU (sem aceleração por GPU)
DirectX 12 DirectX 12
GPU backend Backend da GPU
Linux display server Servidor de exibição Linux
X11 X11
Metal Metal
OpenGL OpenGL
Use tablet pressure Usar a pressão da mesa digitalizadora
@@ -2467,6 +2469,7 @@
Native file drag-and-drop is unavailable Arrastar e soltar arquivos não está disponível
Native file drag-and-drop is not supported on Wayland yet. Use File › Open, or copy the image in your file manager and paste it with {paste}. O recurso nativo de arrastar e soltar arquivos ainda não funciona no Wayland. Use Arquivo › Abrir ou copie a imagem no gerenciador de arquivos e cole-a com {paste}.
To drop files, start PhotoCraft under XWayland: `{command}` Para soltar arquivos, execute o PhotoCraft no XWayland: `{command}`
Or set Preferences › Performance › Linux display server to X11: PhotoCraft then always starts under XWayland. Ou defina Preferências › Desempenho › Servidor de exibição Linux como X11: o PhotoCraft passa a iniciar sempre no XWayland.
Edit › Paste Editar › Colar
Use File › Open, or paste a copied image with {paste}. Use Arquivo › Abrir ou cole uma imagem copiada com {paste}.
Mixer Brush Tool Ferramenta Pincel misturador
Can't render this file because it contains an unexpected character in line 6 and column 47.
+3
View File
@@ -1395,6 +1395,7 @@
Native file drag-and-drop is unavailable Нативное перетаскивание файлов в Wayland недоступно
Native file drag-and-drop is not supported on Wayland yet. Use File › Open, or copy the image in your file manager and paste it with {paste}. Нативное перетаскивание файлов в Wayland пока не поддерживается. Откройте файл через Файл › Открыть или скопируйте изображение в файловом менеджере и вставьте его с помощью {paste}.
To drop files, start PhotoCraft under XWayland: `{command}` Чтобы перетаскивать файлы, запустите PhotoCraft в XWayland: `{command}`
Or set Preferences › Performance › Linux display server to X11: PhotoCraft then always starts under XWayland. Или выберите в Настройки › Производительность › Дисплейный сервер Linux значение X11: PhotoCraft будет всегда запускаться в XWayland.
Edit › Paste Редактирование › Вставить
Photo Фото
Print Печать
@@ -2179,6 +2180,8 @@
Font preview Предпросмотр шрифтов
Full size tip Весь диаметр кисти
GPU backend Бэкенд GPU
Linux display server Дисплейный сервер Linux
X11 X11
Gamut warning color Цвет предупреждения об охвате
Gamut warning opacity Непрозрачность предупреждения об охвате
General Основные
Can't render this file because it contains an unexpected character in line 6 and column 47.
+3
View File
@@ -986,6 +986,7 @@
Native file drag-and-drop is unavailable Wayland 上不支持原生文件拖放
Native file drag-and-drop is not supported on Wayland yet. Use File › Open, or copy the image in your file manager and paste it with {paste}. Wayland 尚不支持原生文件拖放。请使用“文件 › 打开”,或在文件管理器中复制图像后使用 {paste} 粘贴。
To drop files, start PhotoCraft under XWayland: `{command}` 要拖放文件,请在 XWayland 下启动 PhotoCraft:`{command}`
Or set Preferences › Performance › Linux display server to X11: PhotoCraft then always starts under XWayland. 或将 首选项 › 性能 › Linux 显示服务器 设为 X11:PhotoCraft 将始终在 XWayland 下启动。
Edit › Paste “编辑 › 粘贴”
Duplicate Layers… 复制图层…
Duplicate style 复制样式
@@ -2069,6 +2070,8 @@ cameraRaw Blending 混合
CPU (no GPU acceleration) CPU(无 GPU 加速)
DirectX 12 DirectX 12
GPU backend GPU 后端
Linux display server Linux 显示服务器
X11 X11
Metal Metal
OpenGL OpenGL
Use tablet pressure 使用数位板压感
1 # Simplified Chinese (zh-hans) catalog. UTF-8, TAB-separated columns:
986
987
988
989
990
991
992
2070
2071
2072
2073
2074
2075
2076
2077
+3
View File
@@ -987,6 +987,7 @@
Native file drag-and-drop is unavailable Wayland 不支援原生檔案拖放
Native file drag-and-drop is not supported on Wayland yet. Use File › Open, or copy the image in your file manager and paste it with {paste}. Wayland 尚未支援原生檔案拖放。請使用「檔案 › 開啟」,或在檔案管理員中複製影像後使用 {paste} 貼上。
To drop files, start PhotoCraft under XWayland: `{command}` 若要拖放檔案,請在 XWayland 下啟動 PhotoCraft:`{command}`
Or set Preferences › Performance › Linux display server to X11: PhotoCraft then always starts under XWayland. 或將 偏好設定 › 效能 › Linux 顯示伺服器 設為 X11:PhotoCraft 之後一律在 XWayland 下啟動。
Edit › Paste 「編輯 › 貼上」
Duplicate Layers… 複製圖層…
Duplicate style 複製樣式
@@ -2010,6 +2011,8 @@
CPU (no GPU acceleration) CPU (無 GPU 加速)
DirectX 12 DirectX 12
GPU backend GPU 後端
Linux display server Linux 顯示伺服器
X11 X11
Metal Metal
OpenGL OpenGL
Use tablet pressure 使用繪圖板壓力
Can't render this file because it contains an unexpected character in line 6 and column 47.
+2
View File
@@ -79,6 +79,7 @@ pub fn wayland_file_drop_guidance(app: &mut PhotocraftApp) {
if let Some(command) = &app.services.xwayland_command {
lines.push("To drop files, start PhotoCraft under XWayland: `{command}`".to_owned());
args.push(("command".to_owned(), command.clone()));
lines.push("Or set Preferences › Performance › Linux display server to X11: PhotoCraft then always starts under XWayland.".to_owned());
}
let id = post(app, "Native file drag-and-drop is unavailable", lines, false, Some(WAYLAND_FILE_DROP_DISMISSED));
if let Some(notice) = app.ui.notices.iter_mut().find(|notice| notice.id == id) {
@@ -229,6 +230,7 @@ mod tests {
assert!(guidance.contains(&format!("paste it with {paste}")), "{guidance}");
// The relaunch command is the one for this install (an AppImage here), not a guess.
assert!(guidance.contains("under XWayland: `WAYLAND_DISPLAY= '/apps/Photo Craft.AppImage'`"), "{guidance}");
assert!(guidance.contains("Linux display server to X11"), "{guidance}");
assert_eq!(app.ui.notices[0].dismiss_pref.as_deref(), Some(WAYLAND_FILE_DROP_DISMISSED));
for i in 0..MAX_NOTICES {
post(&mut app, format!("Transient {i}"), Vec::new(), false, None);
+2 -2
View File
@@ -9,7 +9,7 @@ Generated by `cargo xtask scorecard` from `perf/budgets.toml`, `perf/baseline.js
| [Performance](#performance) | 3 | 22 | 13 | 47 scenarios: 3 within budget, 22 over budget or failing, 15 tracked only, 6 not run, 7 not measurable yet (baseline 2026-10-05) |
| [File compatibility](#file-compatibility) | 4 | 12 | 11 | io corpus: oracle ≥ 146/170, round trip ≥ 169/170; psd-tools corpus: oracle ≥ 236/309, round trip ≥ 307/309; photoshop oracles: oracle ≥ 133/256, round trip ≥ 258/256 |
| [Tools](#tools) | 11 | 14 | 8 | |
| [Workspace and UI](#workspace-and-ui) | 0 | 7 | 16 | settings that do nothing: 55 of 140 (target 0) |
| [Workspace and UI](#workspace-and-ui) | 0 | 7 | 16 | settings that do nothing: 55 of 141 (target 0) |
| [Type](#type) | 0 | 3 | 6 | |
| [Automation](#automation) | 3 | 2 | 6 | 627 of 627 menu items live (100.0%) |
| [Reliability](#reliability) | 4 | 1 | 2 | never-crash lints on 27 of 27 crates; panic_hunt present |
@@ -157,7 +157,7 @@ Corpus floors (`crates/io/tests/corpus.rs`): the enforced minimums; the corpus t
## Workspace and UI
**Settings that do nothing: 55 of 140** (target 0, #204). Counted by the prefs audit (`xtask/src/scorecard.rs`): a `Preferences` field counts as read when code outside the prefs model (`prefs.rs` except its `impl Session` blocks; tests excluded; the schema-driven dialog never names a field) accesses `section.field`, or `.section` and `.field` in the same file, or calls a section method that reads `self.field`. It is a heuristic lower bound: a generic name can look read when it isn't.
**Settings that do nothing: 55 of 141** (target 0, #204). Counted by the prefs audit (`xtask/src/scorecard.rs`): a `Preferences` field counts as read when code outside the prefs model (`prefs.rs` except its `impl Session` blocks; tests excluded; the schema-driven dialog never names a field) accesses `section.field`, or `.section` and `.field` in the same file, or calls a section method that reads `self.field`. It is a heuristic lower bound: a generic name can look read when it isn't.
Unread: `general.color_picker`, `general.beep_when_done`, `general.export_clipboard`, `general.resize_image_during_place`, `general.always_create_smart_objects_when_placing`, `general.animated_zoom`, `general.zoom_resizes_windows`, `interface.show_channels_in_color`, `interface.dynamic_color_sliders`, `workspace.auto_collapse_icon_panels`, `workspace.auto_show_hidden_panels`, `workspace.open_documents_as_tabs`, `workspace.enable_floating_document_window_docking`, `workspace.large_tabs`, `workspace.enable_narrow_options_bar`, `tools.enable_flick_panning`, `tools.vary_round_brush_hardness_on_hud`, `tools.show_transformation_values`, `tools.double_click_layer_mask_launches_select_and_mask`, `file_handling.image_previews`, `file_handling.lowercase_extension`, `file_handling.save_in_background`, `file_handling.ignore_exif_profile_tag`, `file_handling.maximize_psd_compatibility`, `performance.cache_levels`, `performance.legacy_compositing`, `scratch_disks.disks`, `cursors.brush_preview_color`, `units_and_rulers.type_units`, `units_and_rulers.column_width`, `units_and_rulers.gutter`, `units_and_rulers.print_resolution`, `units_and_rulers.screen_resolution`, `plug_ins.show_extension_panels`, `plug_ins.allow_scripts_to_connect`, `plug_ins.generator_enabled`, `type_.smart_quotes`, `type_.missing_glyph_protection`, `type_.show_font_names_in_english`, `type_.use_esc_to_commit`, `type_.text_engine`, `type_.font_preview`, `type_.fill_new_type_layers_with_placeholder`, `type_.recent_fonts`, `enhanced_controls.scrubby_slider_acceleration`, `enhanced_controls.touch_gestures`, `enhanced_controls.zoom_with_trackpad_pinch`, `raw_defaults.color_space`, `raw_defaults.bit_depth`, `raw_defaults.resolution`, `raw_defaults.sharpen_for`, `raw_defaults.open_as_smart_object`, `raw_defaults.apply_auto_tone`, `integrations.allow_agent_control`, `integrations.control_port`.