Follow the canvas from one display to the next
The rest of FR-DSP-8. The develop session now carries the space its canvas is encoded into, and `render` composes for it instead of for sRGB — which is the whole of the change to the pixel path, because the output space was always a parameter of composition and always entered the structure hash. A display change is a recomposition. The space is set on the way into every render rather than pushed when the window moves, so a photograph opened while the window already sits on the second monitor is right on its first frame instead of flashing the wrong colour until the next poll. Which display that is comes from sampling the window's position and scale factor twice a second — Slint reports neither a move nor a display change — and re-surveying only when they differ. Settings shows what came back under ABOUT: the display, the space, why, and the other monitors, because the failure FR-DSP-8 names is one that is invisible from the display you are reading the page on. Fractional scaling: the canvas is now rendered at the physical pixel size of the box it occupies rather than the logical one, so the compositor presents it 1:1. At 1.25 it was previously handed 1600 samples to fill 2000 device pixels, and the softness that produces reads like a bad demosaic rather than like a scaling bug. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -225,14 +225,19 @@ pub struct DisplayInfo {
|
||||
/// one, otherwise an index. Shown in About so a two-monitor user can tell
|
||||
/// which row is which.
|
||||
pub name: String,
|
||||
/// Where this display sits in the desktop's coordinate space, in logical
|
||||
/// pixels, if the server said. `None` on Wayland, which deliberately does
|
||||
/// not tell a client where anything is; see [`DisplaySurvey::containing`].
|
||||
/// Where this display sits in the desktop's coordinate space, if the
|
||||
/// server said. `None` on Wayland, which deliberately does not tell a
|
||||
/// client where anything is; see [`DisplaySurvey::containing`].
|
||||
pub bounds: Option<Bounds>,
|
||||
pub profile: DisplayProfile,
|
||||
}
|
||||
|
||||
/// A display's rectangle in the desktop's logical coordinate space.
|
||||
/// A display's rectangle in the display server's own screen coordinates.
|
||||
///
|
||||
/// Physical device pixels on X11, which is what RandR states a CRTC's origin
|
||||
/// and size in — and, not by coincidence, the same space Slint reports a
|
||||
/// window's position in. The two are comparable without conversion, and a
|
||||
/// conversion inserted "for tidiness" is how they would stop being.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct Bounds {
|
||||
pub x: i32,
|
||||
@@ -308,8 +313,8 @@ impl DisplaySurvey {
|
||||
}
|
||||
}
|
||||
|
||||
/// Which display is showing a window whose top-left is at `(x, y)` in
|
||||
/// logical desktop coordinates, as an index into [`Self::displays`].
|
||||
/// Which display is showing a window at `(x, y)` in the display server's
|
||||
/// screen coordinates, as an index into [`Self::displays`].
|
||||
///
|
||||
/// **The point is the window's centre, and the caller computes it.** A
|
||||
/// window straddling two monitors is showing more of itself on one of
|
||||
|
||||
Reference in New Issue
Block a user