Skip to content

viewport 0.10.0

Latest

Choose a tag to compare

@codebam codebam released this 18 Nov 08:03
· 45 commits to main since this release
v0.10.0
f5915e1

The shell's extension surface grows up — widget extensions declare an
options schema the settings panel draws as real controls — and the NixOS
module names the browser the chromium backend drives and leaves the
bootstrap config to your own file. Underneath: a security and correctness
pass across the shell backends, auto-HDR that follows every fullscreen path,
a screenshot picker that finally freezes the screen, and a Smithay refresh.
The full list is in the
changelog;
the headlines are below.

Extensions and the NixOS module

  • Widget extensions declare an options schema, the same shape wallpaper
    extensions use, and the settings panel draws it as real controls — a group
    per custom widget on the bar, a repeated name drawn per instance. Changing
    a control writes the whole bar list back and remounts the widget on the new
    options. The schema is validated at registration.
  • programs.viewport.chromiumBinary names the browser the chromium
    backend drives, by path — Google Chrome included, same Blink, same DevTools
    protocol. The backend links no engine, so any Chromium-family browser
    answers.
  • programs.viewport.userConfig starts the session without --config,
    leaving the bootstrap config to ~/.config/viewport/config.json — the mode
    for a config a home-manager xdg.configFile writes.

Security and correctness

  • The frame guard and load gate are shared once, in
    viewport-shell-bridge, wiring included — and cef inherits chromium's
    navigation behaviour: its gate no longer stays open across a cross-document
    navigation, a method result cannot reopen it (the reload's own Page.reload
    result could), and the first install waits for the load event before
    draining. Events are no longer evaluated into a half-loaded document.
  • The injected bridge's origin check refuses UNC-style file://host/path
    URLs
    — the same rule the Rust classifier it mirrors always applied. Both
    Servo backends share the fixed script.
  • Auto-HDR re-evaluates on every path that moves its inputs: a shell
    view.fullscreen, a taskbar's foreign-toplevel request, a minimize or a
    hide. An HDR game put fullscreen by the shell or the taskbar kept the screen
    in SDR until something else happened to move.
  • output.query is a read any same-user script may ask. It was privileged
    and side-effecting, so the screenshot binding's untrusted helper was refused
    and the freeze-frame flow silently fell back to selecting on the live
    desktop. The query now answers the asker alone, reconciling nothing — and
    the screenshot freezes again.

Under the hood

  • The Smithay fork rebases onto upstream 7ff0ede4 (xdg-decoration v2, the
    Xwayland pidfd, a tablet grab deadlock fix, a keymap null-terminator fix),
    its four patches unchanged; viewport-vulkan follows to the same commit,
    and 27 other packages move to their highest compatible versions.
  • The startup every shell backend repeated — log subscriber, origin-checked
    options, urandom token, private directory, extra-args env — lives in the
    bridge once; the injected bridge script is one template with a hole per
    transport; the input dispatch is split into per-event handlers; the chromium
    command pipe writes through one File with a VecDeque queue; servoshell's
    events poll is assembled rather than re-serialized; the embedded servo
    bridge reads its query in one pass.