Commit Graph
700 Commits
Author SHA1 Message Date
dotCooCoo 15d11beb83 Print: a second scheduler on a loopback port supplies its own paper sizes
A `CUPS_SERVER` or `ServerName` of `localhost`, `127.0.0.1` or `::1` counts
as this machine's scheduler only with no port or port 631. On another port
(a second CUPS instance) the dialog no longer reads `/etc/cups/ppd`, whose
queues belong to the default scheduler, and asks `lpoptions` and IPP
instead.

When the named server is one of CUPS's own domain sockets and neither the
PPD nor `lpoptions` lists sizes, the IPP lookup asks `localhost` on the IPP
default port, as it already does when no server is named. `ipptool` rejects
a URI whose host is a socket path (`httpSeparateURI` in CUPS's
`cups/http-support.c`), so another socket path is not asked.
2026-12-02 15:48:30 -08:00
dotCooCoo fae03ac701 Merge main into fix/print-paper-size-to-cups 2026-12-02 14:27:22 -08:00
dotCooCoo af28b5380c Print: a remote CUPS scheduler supplies its own paper sizes
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.
2026-12-02 12:51:04 -08:00
dotCooCoo badc85e0d0 Merge main into fix/print-dialog-printer-discovery 2026-12-02 12:10:58 -08:00
dotCooCoo ec8c564a6f Merge main into fix/print-paper-size-to-cups 2026-12-02 11:48:41 -08:00
dotCooCoo f382526eb9 Print: the IPP paper lookup uses IPP_PORT for a server named without a port
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.
2026-12-02 10:32:46 -08:00
dotCooCoo 11dfa1ce09 Print: the dialog finds printers on a background job
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.
2026-12-02 07:55:04 -08:00
dotCooCoo f5b9e1a04b Print: a client.conf comment no longer spoils the CUPS server name
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.
2026-12-02 07:39:49 -08:00
dotCooCoo d23dd117ba Print: the job asks CUPS for the paper size chosen
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).
2026-12-02 07:07:42 -08:00
dotCooCoo b0bf3506dc Print: a stalled paper-size lookup no longer piles up worker threads
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.
2026-12-02 06:16:59 -08:00
.CooCoo 245af424e0 Merge pull request #10511 from dotCooCoo/fix/print-media-per-printer
Print: the Size list shows the chosen printer's paper sizes
2026-12-02 02:02:07 -08:00
.CooCoo ed6619523c Merge pull request #10504 from dotCooCoo/fix/toolbar-chips-one-line
Tools: Color, Gradient and None share one line in a one-column rail
2026-12-01 22:45:13 -08:00
dotCooCoo 75834b0279 Merge main into fix/print-media-per-printer 2026-12-01 20:24:47 -08:00
.CooCoo 22bc29d69d Merge pull request #10460 from dotCooCoo/fix/test-lint-mirror-false-alarms
xtask: test-lint mirror leaves out entry reads, never-run follows #[path] modules
2026-12-01 20:19:50 -08:00
dotCooCoo c6c7de257f Dependencies: move the craft-libs pin to craft-libs main 77ade517
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.
2026-12-01 20:14:00 -08:00
dotCooCoo a73e85324a Merge main into fix/toolbar-chips-one-line 2026-12-01 19:43:37 -08:00
.CooCoo 802a869c68 Merge pull request #10517 from dotCooCoo/fix/test-pass-remaining-crates
Tests: assert list lengths and saved names in tool, path, 3D, brush and CAD tests
2026-12-01 19:28:41 -08:00
dotCooCoo c1b9fb98c3 Merge main into fix/test-lint-mirror-false-alarms 2026-12-01 18:24:34 -08:00
dotCooCoo 916d5a76c0 Merge main into fix/print-media-per-printer 2026-12-01 18:06:39 -08:00
dotCooCoo c33f0cfa13 Print: each printer choice reads the driver's paper sizes again
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.
2026-12-01 18:06:39 -08:00
dotCooCoo ccf5765419 Tests: assert counts and saved names in tool, path, 3D, brush and CAD tests
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.
2026-12-01 17:35:21 -08:00
dotCooCoo 0a20ffb9ed Merge main into fix/print-media-per-printer 2026-12-01 16:57:55 -08:00
dotCooCoo 5d5196b1fd Merge main into fix/print-media-per-printer
# Conflicts:
#	apps/vectorcraft/src/printing.rs
2026-12-01 16:29:02 -08:00
dotCooCoo 4c883f94cc Print: the Size list shows the chosen printer's paper sizes
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.
2026-12-01 16:28:48 -08:00
dotCooCoo a61a9ba254 Merge main into fix/test-lint-mirror-false-alarms 2026-12-01 16:17:26 -08:00
dotCooCoo 6d0f17690a Merge main into fix/toolbar-chips-one-line 2026-12-01 15:39:11 -08:00
dotCooCoo 2157200131 Merge main into fix/new-document-spacing 2026-12-01 15:38:11 -08:00
dotCooCoo 184978b9a6 Tools: Color, Gradient and None share one line in a one-column rail
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.
2026-12-01 14:44:03 -08:00
.CooCoo 4596f1a8be Merge pull request #10374 from dotCooCoo/fix/swallowed-regression-guards
Tests: guards check the environment, not the output under test
2026-12-01 14:10:23 -08:00
dotCooCoo 55cba88a89 Merge main into fix/toolbar-chips-one-line 2026-12-01 13:58:56 -08:00
dotCooCoo 16b0f49adb Merge main into fix/test-lint-mirror-false-alarms 2026-12-01 13:34:15 -08:00
.CooCoo a5a3e40c5e Merge pull request #9087 from dotCooCoo/feat/scripts-print-printer
Scripts: Document.print prints to an installed printer and app.printerList lists the printers
2026-12-01 13:11:17 -08:00
dotCooCoo b2e8b5637e Merge main into chore/never-run-test-allows 2026-12-01 02:55:37 -08:00
dotCooCoo 0f95fb0880 Merge main into chore/never-run-test-allows 2026-12-01 02:21:01 -08:00
yoriswind 93286c8deb Dock panels inside the window on native Wayland (#10341) 2026-12-01 11:14:03 +01:00
yoriswind 45fd2a5347 Troubleshooting: report the active graphics driver (#10348) 2026-12-01 10:59:09 +01:00
dotCooCoo 010367e39e Tests: allow the 26 Windows and macOS tests that CI never runs
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.
2026-12-01 01:46:09 -08:00
dotCooCoo 1dbbf87436 Tests: guards check the environment, not the output under test
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.
2026-11-30 21:56:24 -08:00
dotCooCoo ea8352c5d7 Merge main into feat/scripts-print-printer 2026-11-30 20:57:56 -08:00
dotCooCoo 946774792a Pin craft-libs at 965c7beeb 2026-11-30 20:40:43 -08:00
dotCooCoo e880f695a2 New Document: Preset Details rows stand a stack gap apart
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.
2026-11-30 20:40:26 -08:00
dotCooCoo 1b2da536cc Merge main into feat/scripts-print-printer 2026-11-30 15:25:50 -08:00
.CooCoo 90e08df23f Merge pull request #10312 from dotCooCoo/fix/ui-frame-stability
Menus: a menu opens under its title on a monitor beside a portrait one
2026-11-30 15:02:38 -08:00
.CooCoo f4f42de9d8 Merge pull request #10239 from dotCooCoo/fix/plugins-whole-tree-reads
CI: declare the files each crate reads in other crates, for test selection
2026-11-30 14:05:36 -08:00
.CooCoo b470a4b65a Merge pull request #10130 from dotCooCoo/fix/wayland-pinch-zoom
Canvas: a touchpad pinch zooms on native Wayland
2026-11-30 12:38:20 -08:00
dotCooCoo 58923e0d78 Menus: a menu opens under its title on a monitor beside a portrait one
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).
2026-11-30 12:21:21 -08:00
.CooCoo b95ea7d0ce Merge pull request #10287 from dotCooCoo/fix/xwayland-tablet-stylus
Linux: the log says why a pen's window stays on Wayland, and names the pens XWayland lists
2026-11-30 12:20:06 -08:00
.CooCoo cbfeaab604 Merge pull request #10265 from dotCooCoo/fix/issue-2654
Graphics: start on Mesa's software renderer when no adapter can show the window
2026-11-30 12:01:10 -08:00
dotCooCoo b3def332ff Merge main into feat/scripts-print-printer 2026-11-30 11:40:16 -08:00
dotCooCoo ab4e56934b Linux: the log says why a pen's window stays on Wayland, and names the pens XWayland lists
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.
2026-11-30 07:48:08 -08:00