When CUPS_SERVER or client.conf's ServerName names a remote scheduler,
the Print dialog no longer reads a same-named PPD under /etc/cups/ppd.
The job goes to the remote queue, so the sizes now come from that
server through lpoptions and IPP. A domain socket, localhost, 127.0.0.1
and ::1, with an optional port and /version= suffix, still count as
local and keep the PPD lookup.
ipp_queue_uri built ipp://host/printers/name from CUPS_SERVER or the
client.conf ServerName, so a server named without a port was always asked
on 631, while CUPS clients use IPP_PORT for it. The app now reads
IPP_PORT and passes it in; a port in the server name keeps precedence, and
a bracketed IPv6 host counts as having a port only after its ]. With no
server named, the lookup uses localhost on IPP_PORT only when none of the
CUPS domain sockets exists, since CUPS otherwise talks to its socket.
docs/mcp.md describes the lookup's server and port.
File > Print listed the system's printers on the UI thread when the
dialog opened and on each Refresh, so a slow or unreachable print
server froze the app. The desktop print service now offers its
discovery to a background job; the dialog opens on Default Printer and
PDF File, shows and announces the lookup, and takes the list when it
arrives.
- Discovery on Windows lists the queues without asking each driver for
its capabilities (`craft::print::printer_queues`).
- PDF File, its preview and Done stay available during the lookup.
Print to a printer is disabled until the list is applied, and a held
Print to a printer is not submitted.
- Setup... appears once the lookup has ended, since it reads the
printers again on Windows.
- Discovery starts on the first pass even when another drawing is
active, and a lookup that ends without a list leaves Default Printer
and PDF File.
The Print dialog's discovery came with #8800.
cups_server() took everything after ServerName, so a line such as
"ServerName print.example.com # office" gave a value that
ipp_queue_uri rejects, and IPP paper discovery was skipped. The value
is now read as CUPS reads the file: the first unescaped # starts a
comment, and \# stands for a literal #. On macOS, which does not read
ServerName, only CUPS_SERVER is used.
On macOS and Linux the print job carried no media option, so the queue
printed on its default paper whatever Size the Print dialog showed. The
dialog now sends the driver's keyword for the chosen Size, and
file.print takes it as `paper`; the job passes it to CUPS as `media`.
A `paper` that is not a single keyword is an error, and so is `paper`
with file output, with directPdf or on Windows, where the spooler does
not apply it. While the chosen printer's sizes are still loading, Print
is refused and the dialog stays open.
A queue with no PPD on this machine (a driverless or remote printer)
listed no paper sizes. Its sizes now come from `lpoptions -p NAME -l`,
and when its server has no PPD either, from the queue's IPP
media-supported attribute on the scheduler CUPS uses. CUPS's B4 and B5
keywords are the JIS sizes, and ISOB4 and ISOB5 the ISO ones.
Builds on the printer paper lookup in apps/vectorcraft/src/printing.rs
(#10511).
Each printer choice in the Print dialog started a new thread to read the
driver's paper sizes, even while earlier reads were still running. A
driver that stalls (printer enumeration has no time limit) left one
thread behind per printer change.
A new read now waits for the running worker. Only the newest choice is
read once that worker ends. When the newest still-running worker has run
15 seconds, the waiting read starts beside it, up to 4 workers in all. A
read that waits 15 seconds with 4 stalled workers gets no driver sizes,
and the dialog keeps its own sizes.
The lookup came from #10511.
craft-libs #4659 (swatch chips that fit a one-column rail) and #4723
have merged, so every craft-libs rev moves from #4659's head edbf2117
to craft-libs main at 77ade517. The egui revisions move to 861d60a6,
the ones that craft-libs rev pins; winit stays at 0dfcec0e. Cargo.lock
changes only the sources of those packages.
A lookup that was still running when the person chose another printer
stayed in the service, and choosing that printer again returned its old
answer without reading the driver. Reopening the dialog on a printer
whose lookup was still running did the same.
`PrintService::papers` now takes `fresh`, which the dialog sets when it
opens and when the printer changes. The desktop service keeps one lookup
in flight and replaces it on a fresh call or a call for another printer,
so an earlier answer is dropped.
Tests whose all() passed on an empty list now check the list's length or
that it is not empty:
- huge_circles_bridge_with_finite_anchors_or_are_refused (pathops bridge)
- smooth_rounds_corners (pathops ops): the four corners stay, smoothed
- a_held_rotation_turns_the_art_around_its_pin (tools ARAP): one point
per mesh vertex
- the_eraser_drag_area_matches_the_release_when_pressure_or_a_mode_starts_during_the_drag
(tools gesture): one released point per press
- every_effect_casts_a_shadow, inflate_cells_across_a_hole_edge_are_cut_to_the_shape,
a_plane_has_only_a_front_and_a_hollow_solid_none and
perspective_runs_0_to_160_degrees_with_the_eye_outside_the_object (three-d)
- a_file_two_branches_include_is_followed_from_the_shallower_one
(scriptcheck): one row per include line
- pens_pick_colors_and_widths (cad HP-GL): four widths
- junk_pressure_brushes_draw_finite_art (brush): all 12 cases draw
Round trips that hold by construction (parse finds the id in ALL) are
replaced with one saved name that must parse and one that must not:
follow_names_parse (pathops shared edge), the shape kinds (pathops
shapes), surfaces_parse_from_their_ids (three-d), the Quick Pen actions
(tools), names_parse_and_serialize_as_names (plugins) and the brush
variation modes, which also compare the serde names with the ids.
crop_keeps_an_instance_whose_art_reaches_the_region (cad) names the
entities written instead of checking that some were.
the_saved_engine_preference_is_found (app) pins the GPU choices the
preferences offer to the three the app reads.
timing_unite_1000_circles (pathops) gets an ignore reason and checks
that Unite gives one shape.
Each changed assertion fails when the code under test is broken (an id
renamed, a list emptied, a flush or instance dropped) and passes when it
is restored.
File > Print offered the same built-in sizes for every printer, so a card
printer's CR80 size could not be chosen. The Size list now holds the paper
sizes the chosen printer's driver lists: the CUPS PPD's PaperDimension
entries on macOS and Linux, and the printer's forms on Windows. A size the
dialog has itself (Letter, A4) keeps its own id under the driver's name;
others print as a custom size of the driver's width and height. Custom is
always offered, and a printer whose driver lists nothing keeps the built-in
list.
The lookup runs on a worker thread and the dialog updates when it answers;
the Windows lookup stops after 10 seconds. Each opening of the dialog and
each printer change reads the driver again. A paper the new printer does
not list becomes a custom size of the same width and height. The preset
editor keeps the built-in list.
craft-libs #4609 measures the Fill and Stroke proxy at the width of its
column, so the proxy no longer widens a one-column Tools panel. The
column is then one rail button less one tight gap wide, and the three
swatch chips (a third of a rail button each, a tight gap apart) took
more than that: None wrapped onto a second line.
The craft-libs pin moves to storytold/craft-libs#4659, which sizes a
swatch chip so the three chips and their gaps fit the column. That rev
also carries #4609 and the other craft-libs changes merged up to
d73e274a. The one-column toolbar test now also checks that the chips
stay inside the column of tools and do not overlap, and a new test
checks the same at UI scale 2.
Each test that a cfg limits to Windows, macOS or a case-insensitive file
system gets a `test-lint: allow never-run` line naming its platform, so
`cargo xtask test-lint` no longer reports them. The tests are unchanged
and still run on their own platform.
Several tests returned early when the code under test gave back nothing,
so the regression they guard against passed. Each of those guards now
checks only what the host provides (an installed face, the bundled
fonts), and the output itself is asserted:
- PDF live text: the lam-alef face is no longer picked by whether its
type imports (#6072); Insert Kashidas asserts the kashida and the
imported type.
- Effects and Expand Appearance on type assert the outlines and the
drawn type when the default face is installed.
- The OpenType panel's Stylistic Sets test asserts sets with the
bundled fonts.
- Thumbnail worker tests assert that the worker starts; the memory
peak test asserts a reading.
- The json2 test checks the interpreter's Date, replace and RegExp on
every run, before looking for json2.js.
- Devanagari arrow keys and the Arabic narrow-area wrap assert the
layout they set up.
The Preset Details rows stood a tight gap apart, so each caption touched
the field above it. craft-libs now lays them out a stack gap apart, with
a fixed details column and Create and Close at its foot (storytold/
craft-libs e93e6f62a and e433cdfa8). The pin moves to craft-libs main
26f293d78, which holds both; the egui and winit revisions are unchanged.
- More Settings and Manage Profiles stand side by side, each as wide as
its words, instead of two buttons across the whole column.
- The pin brings two API changes: CanvasScrollbars::clear_of takes
ShownBars, and a LegacyFile lists its paths and parses one slot per
path.
- Accessible names now read a line break as a space, so the Color Wheel
document-color tests name a swatch "#0000ff Used 1 time".
- The small-window test accepts the Bleed fields in one row when the
fixed column holds them.
Moves craft-libs to a5669ed2f, which places overlays in the room of the
monitor the window is on (craft-libs f31beb26d, merged in #4506). The
old room assumed monitors tile the desktop by their size, so on a
landscape monitor to the right of a portrait one the File menu opened
at (726, 442), far from its title, with scroll arrows.
The new pin is craft-libs main just before #4278, whose dialog changes
need VectorCraft test updates that come with a later pin bump.
The new test menu_on_second_monitor opens the File menu with the window
on the landscape monitor at 1x and 1.5x; it fails on the old pin with
the menu at (726, 442).
Part of #5622. On a Wayland session winit 0.30 receives no input from a
pen, so the app opens its window through XWayland when a pen is attached
(#4967). When it did not, the log said nothing, and a report could not
tell a pen that was not found from a session with no X display.
- On a Wayland session the log now says why the window opens on Wayland:
no pen in /proc/bus/input/devices, the device list could not be read,
VECTORCRAFT_NATIVE_WAYLAND is set, or there is no X display (DISPLAY is
unset, as in the Flatpak, which has --socket=fallback-x11). The
pen-found line names the pen, and the missing-libraries warning no
longer says Linux Display Server is X11 when a pen chose XWayland.
- Under X11 the tablet reader logs the pens the X server lists (for
example XWayland's "xwayland-tablet stylus:16"), again when that list
changes, and the first event from each pen.
- docs/development.md lists the new log lines, the Flatpak override that
gives it an X display, and that GDK_BACKEND=x11 does not move the
window to XWayland.
After the graphics device is lost, a frame the device could not present
stays acquired by the window's surface. When the window closed, eframe
released the surface, and wgpu's Vulkan backend panicked with "Trying to
destroy a SwapchainAcquireSemaphore that is still in use by a
SurfaceTexture" (gfx-rs/wgpu#9277), so the app stopped with an error.
GraphicsLoss now remembers that a loss happened after the frame handled
the report. When the window closes after a loss, the process ends in
on_exit once the app has saved what it keeps on quitting, before the
window's graphics are torn down, on every platform. This is the exit the
macOS accessibility quit already takes (#661); a loss during start-up
still goes to the adapter restart (#651).
Fixes#6374