mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-02 06:07:06 -06:00
Fix #4967: a drawing tablet's pen draws on a Wayland session by default
On a Wayland session Linux Display Server's default, Automatic, opened the window on native Wayland. winit 0.30 doesn't bind the Wayland tablet protocol, and KWin (since Plasma 6.3) and Mutter turn no tablet input into pointer input, so the pen moved only the compositor's cursor and the app got no motion or presses. Only X11 (XWayland) When a Pen Is Attached, which users had to find and choose, sent the window through XWayland, where the pen works as a mouse with its pressure. Automatic now opens the window through XWayland when a pen is attached as the app starts, as PhotoCraft does by default. VECTORCRAFT_NATIVE_WAYLAND=1 keeps the window on Wayland, like PhotoCraft's PHOTOCRAFT_NATIVE_WAYLAND. The X11 choice is unchanged.
This commit is contained in:
@@ -89,8 +89,9 @@ pub const GPU_PREFERENCES: &[(&str, &str)] =
|
||||
&[("automatic", "Automatic"), ("lowPower", "Power Saving (integrated)"), ("highPerformance", "High Performance (discrete)")];
|
||||
/// Performance › Linux Display Server (`linuxDisplayServer`), read by the desktop app at startup:
|
||||
/// `x11` opens the window through XWayland on a Wayland session, where dropped files arrive
|
||||
/// (winit 0.30 has no Wayland drag and drop, #1151); `x11WithPen` does the same only when a pen is
|
||||
/// attached as the app starts: under XWayland a drawing tablet's pen draws as a mouse (#2028).
|
||||
/// (winit 0.30 has no Wayland drag and drop, #1151); `automatic` and `x11WithPen` do the same only
|
||||
/// when a pen is attached as the app starts: under XWayland a drawing tablet's pen draws as a mouse
|
||||
/// (#2028, #4967).
|
||||
const LINUX_DISPLAY_SERVERS: &[(&str, &str)] =
|
||||
&[("automatic", "Automatic"), ("x11", "X11 (XWayland)"), ("x11WithPen", "X11 (XWayland) When a Pen Is Attached")];
|
||||
const BLACK: &[(&str, &str)] = &[("accurate", "Display All Blacks Accurately"), ("rich", "Display All Blacks as Rich Black")];
|
||||
|
||||
@@ -162,9 +162,10 @@ pub struct Prefs {
|
||||
pub real_time_drawing: bool,
|
||||
/// Rasterizer worker threads; -1 = automatic.
|
||||
pub render_threads: i32,
|
||||
/// Linux: `automatic` opens the window on the session's display server; `x11` opens it through
|
||||
/// XWayland on a Wayland session, where dropped files arrive (#1151); `x11WithPen` opens it
|
||||
/// through XWayland only when a pen is attached (#2028). Read when the app starts.
|
||||
/// Linux: `automatic` opens the window on the session's display server, or through XWayland on
|
||||
/// a Wayland session when a pen is attached (#4967); `x11` opens it through XWayland on a
|
||||
/// Wayland session, where dropped files arrive (#1151); `x11WithPen` opens it through XWayland
|
||||
/// only when a pen is attached (#2028). Read when the app starts.
|
||||
pub linux_display_server: String,
|
||||
// File Handling
|
||||
pub background_save: bool,
|
||||
|
||||
Reference in New Issue
Block a user