100 Commits
Author SHA1 Message Date
lotherkandClaude Sonnet 5.5 c6bea4c5d1 wml: ln -sf, the rule must survive a work directory that already has the links
UilLexPars.h/.c are tracked and Uil.c gets a newer mtime in a fresh copy, so the rule runs
and 'ln -s' fails with File exists (MacBook native build, 2026-11-24, mcde-motif).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 06:54:16 +00:00
lotherk 91967e9f0d pkgsrc: build MCDE and Motif from the tree, no archives
Both recipes set DISTFILES and built from archives that tools/mcde-dist.sh
made.  They now set DISTFILES= # empty and copy the tree in do-extract, the
way pkgsrc's own net/fetch and pkgtools/pkg_install do.  The copy is made by
tools/ext-extract.sh: it copies only the files that differ and keeps the time
stamps of the rest, so a commit rebuilds what it touched and not all 27
minutes of MCDE.

Verified: bmake -C pkgsrc/wm/mcde package built mcde-0.1.0.tgz (16 MB) with
no distinfo present.
2026-11-23 19:47:27 +00:00
lotherk 288d13834c dtphoto: one CMD_SHOWOPTIONS case, the merge left two
The merge of the plain-file work with the fork put the same case label in
MenuCallback twice; a switch with two identical case values is an error in
every C, so programs/dtphoto did not compile at all (duplicate case value,
build/logs/release-2026-11-23b-cross.log:dtphoto.c:13095).

Test: gcc -fsyntax-only on dtphoto.c
2026-11-23 11:35:57 +00:00
lotherkandClaude Sonnet 5.5 87687d5ed3 pkgsrc: distinfo of the merged tree (tools/mcde-dist.sh)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-23 08:42:33 +00:00
lotherkandClaude Sonnet 5.5 222417e6bb mcde: the work of the Makronix tree (27 commits since 118b19a171) merged into the fork
The plain-file ext/src/mcde of the Makronix tree carried dtphoto (layers, PSD,
clipboard shape, JPEG/GIF/XPM writers), dtbar, dtsystemsettings (Startup Disk,
dock), dtwm and icon changes that this fork did not have.  Resolved by hand:
dtphoto.c, McdeThumb.c, Thumb.h, dtsystemsettings, dtphoto.msg, AGENTS.md take
the Makronix side (a strict continuation of what the fork mirrored); the fork's
own changes are kept (M_PI guard and the front[] fix of 4e51d6dd, 'No
dttoolchest menu', DeskLowerBackdrops, distinfo until the next ext-dist).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-23 08:34:35 +00:00
lotherk bf039cafc3 pkgsrc: distinfo for the dtphoto fix (67,129,674 bytes)
The archive is made from 4e51d6dd by tools/mcde-dist.sh, so the checksums
belong to the source that carries the M_PI define and the three-argument
memcpy.  Test: the recipe checksum matches the distfile that was just
built, and dtphoto.c in the archive has both fixes.
2026-11-22 20:35:23 +00:00
lotherk 4e51d6dd65 MCDE dtphoto: M_PI and the extruded front colour, for a strict POSIX build
`_POSIX_C_SOURCE 200809L` (line 16) turns off _XOPEN_SOURCE and
_NETBSD_SOURCE, and NetBSD's math.h carries M_PI only for those: all
sixteen uses were an undeclared identifier.  The guard defines the value
every libm has, as lib/McdeSys/test_audio.c already does.

OpExtrude passed a compound literal to memcpy.  Its commas sit between
memcpy's own argument commas, so _FORTIFY_SOURCE counts five arguments
and refuses: "macro memcpy passed 5 arguments, but takes just 3".  A
named array keeps the call a three-argument call.

Both are what a pkgsrc build of wm/mcde stops on, before any binary:

  dtphoto.c:4019:31: error: 'M_PI' undeclared (first use in this function)
  dtphoto.c:8416:53: error: macro "memcpy" passed 5 arguments, but takes just 3

Verified: the file compiles with the build's own flags,
`cc -fsyntax-only -std=gnu11 -D_POSIX_C_SOURCE=200809L -D_FORTIFY_SOURCE=2
-O2` -> exit 0, and with -Wall -Wextra no warning points at the new lines.
2026-11-22 20:13:28 +00:00
lotherk 7c9347dc9b pkgsrc: distinfo for the IRIX font catalogs (67,131,128 bytes) 2026-11-22 19:08:23 +01:00
lotherk 7013da2cb1 localized: the font catalogs carry the IRIX Helvetica too
The NLS catalogs (Dtwm.tmsg, Dtstyle.tmsg, sys.font.tmsg in 18 locales) held
the -dt-interface system/user font strings, so they overrode the source
defaults at build time: the panel, the Style Manager's font resources and the
session fonts stayed on the wide CDE face.  They are Adobe Helvetica now --
14 px on a wide screen, 12 medium, 10 small, the sizes of the 4DWm reference.
The Chinese locales keep their CJK aliases.

Measured: gencat on the C Dtwm, Dtstyle and sys.font catalogs rc=0; the
compiled Dtwm.cat contains -adobe-helvetica-medium-r-normal--14-*;
make -C programs/dtwm rc=0 and make -C programs/dtsession rc=0, 0 errors.
2026-11-22 19:07:30 +01:00
lotherk d283449167 pkgsrc: distinfo for the IRIX session fonts (67,131,895 bytes) 2026-11-22 19:01:40 +01:00
lotherk d43e9881b1 dtsession: the session UI is the IRIX Helvetica, not the wider CDE face
The global Xresources used -dt-interface system at 14 px for *FontList,
buttons, labels, text and the editor; in buttons, dialogs and lists that
read one size too big next to the IRIX look.  The session fonts are Adobe
Helvetica now -- 14 px on a screen wider than 1175 pixels, 12 on a medium
one, 10 on a small one -- the face of the 4DWm reference.

The title and the menus are untouched: 14 px bold oblique, as the 4DWm
app-defaults say (Dtwm.defs.src, 8a0a5ac3).  The panel keeps its 14/13/10.

sys.font.src carries the same defaults for dtsession's sys.fonts.

Measured: cpp -P -DXCOMM=# -DWIDTH=1280 sys.resources.src selects
-adobe-helvetica-medium-r-normal--14-* for FontList/button/label/text;
make -C programs/dtwm rc=0 and make -C programs/dtsession rc=0, 0 errors.
2026-11-22 19:00:31 +01:00
lotherk ab00c2186c pkgsrc: distinfo for the panel drag and drop tree (67,130,796 bytes) 2026-11-22 18:40:58 +01:00
lotherk d651db9306 dtwm: the panel takes dropped programs into the dock
Dropping a file or folder on the front panel's background adds it to the
dock: an executable as itself, a folder as `dtfile -dir`, a plain file is
ignored.  The site is the panel form (Motif DnD, FILENAME transfer, COPY), so
a drop on a control still goes to the control's own site and runs its action
with the file; the form only sees the empty panel.  KeepClass writes
~/.dt/panel-apps and redraws the dock at once, the same list the Dock pane
edits.

dtfile is the source already: DtDndDragStart in File.c with
DtDND_FILENAME_TRANSFER, started by button 1 or 2.

Measured: make -C programs/dtwm rc=0, 0 errors; make -C programs/dtfile
rc=0, 0 errors (the MacBook build of this tree).
2026-11-22 18:38:57 +01:00
lotherk da3f2019ae pkgsrc: distinfo for the tree archive
tools/mcde-dist.sh archives SRCREV^{tree} now (no pax header that changes
with every commit); the archive is 67,130,261 bytes.  This distinfo is for
exactly that file.
2026-11-22 17:41:43 +01:00
lotherk 313ba2bdea Merge remote-tracking branch 'origin/main'
# Conflicts:
#	pkgsrc/distinfo
2026-11-22 17:36:56 +01:00
lotherk 0cea680844 pkgsrc: distinfo for the merged UTF-8 title tree
67,130,487 bytes, from the merge of the UTF-8 title work with dtphoto and the
libDtChat tests.
2026-11-22 17:36:26 +01:00
lotherk 23f5afb4c2 Merge origin/main into the UTF-8 title work
The other agent changed dtphoto, the thumbnailer and the libDtChat tests;
only the generated distinfo conflicted.  This merge keeps our checksums for
now and the next mcde-dist run makes them for the merged tree.
2026-11-22 17:35:42 +01:00
lotherk c00e455044 pkgsrc: distinfo from the tree archive (stable bytes)
The recipe's checksums now describe the archive the repaired rule makes:
the tree of the commit, gzip -n -6, pkgsrc/ left out.  67,121,814 bytes,
BLAKE2s dd809aaa..., SHA512 76ec9e10....

Measured 2026-11-22 on the build host: 4fead8a3 and c6441410 have the same
source tree (only pkgsrc/distinfo differs) and now give byte-identical
archives, so this distinfo describes its own tip as well as the commit
before it.  Before the fix the same two commits gave 67,122,036 and
67,122,047 bytes because git archive writes the commit id as a
pax_global_header.

The recipe is not in the archive (mcde-dist.sh leaves pkgsrc/ out on
purpose), so this commit does not change the bytes it describes.
2026-11-22 16:35:37 +00:00
lotherk 78993ae092 pkgsrc: distinfo for the UTF-8 title tree 2026-11-22 17:33:40 +01:00
lotherk 067b95ecb3 dtwm: UTF-8 window titles in the IRIX face
The title was drawn from an XmString with the client fontList, a single X
font: under LC_CTYPE=C a UTF-8 _NET_WM_NAME became the JIS bytes "FJK\" and
the umlaut was dropped (measured 2026-11-22 on the MacBook; xmessage with
_NET_WM_NAME "Grüße 日本").

The title has its own XFontSet now -- the reference's Helvetica 14 bold
oblique with an ISO10646 fallback -- and DrawWindowTitle draws the UTF-8 text
with Xutf8DrawString, clearing the box first so a character the set cannot
draw leaves no old glyph behind.  The text comes from _NET_WM_NAME when the
client sets it (the atoms are interned even when EWMH is off) and from
WM_NAME otherwise, converted from compound text with _XmStringUngenerate;
titleUtf8 is freed with the client and zeroed when the ClientData is
allocated (XtMalloc, not XtCalloc -- the first version crashed on the
garbage).

0010.language gives a session without a language LC_CTYPE=C.UTF-8: XCreateFontSet
builds for the locale, and in C the set had only ASCII (font set test:
"Grüße" 17 px instead of 43, 10 fonts instead of 1).

Measured: make -C programs/dtwm rc=0, 0 errors; the MacBook title bar reads
"Grüße" in the IRIX face.
2026-11-22 17:32:34 +01:00
lotherk c6441410ce pkgsrc: distinfo for the merged tree (the dtphoto line of 2026-11-22)
The recipe builds mcde-0.1.0.tar.gz from the gitlink, and the archive of
4fead8a3 is not the archive of 0fa42ac7: programs/dtphoto/dtphoto.c went
from 1,280 to 13,908 lines with the split of the makronix tree, and
dtpaint.c from 997 to 3,108.

Made with the tree's own rule (tools/mcde-dist.sh on the build host):
git archive --mtime=<last source commit> + gzip -n -6, pkgsrc/ left out.
67,122,036 bytes, BLAKE2s bb9d08d3..., SHA512 035e880d..., digest(1) from
pkgsrc's bootstrap.

The archive this line describes lives in the Makronix tree at
distfiles/mcde-0.1.0.tar.gz and is committed there with the gitlink bump;
the two must be the same bytes or pkgsrc refuses the package.

Measured 2026-11-22: a fresh clone of this fork builds the four programs
the merge touched (dtphoto, dtpaint, dttoolbox, dtsystemsettings) and
`make check` in libDtChat is 24/24.
2026-11-22 16:19:04 +00:00
lotherk 4fead8a3dc libDtChat tests: no /tmp/opencode, and test_i18n finds its catalogs
Two defects in the test suite, both of the kind that fails on another
machine but not on the one it was written on.

1. Seven tests put their scratch directories below /tmp/opencode --
   a directory of the environment they were written in, not of the
   system.  mkdtemp() returns NULL when the parent is missing, so on a
   machine without /tmp/opencode every one of them failed with a "NULL"
   check or perror("mkdtemp"), and nothing was wrong with the code under
   test.  dc_test_tmpdir() (dc_internal.h, instance.c) now uses $TMPDIR,
   or /tmp when it is unset or not absolute.

   Measured: after renaming /tmp/opencode away (sudo mv), make check in
   lib/libDtChat is 24/24; before the change the same run failed on
   test_identity, test_pair, test_store, test_instance, test_filexfer,
   test_local and test_i18n.

2. test_i18n takes <de.msg> <en.msg> but TESTS runs it without arguments
   (f46a914c added it to TESTS without a runner), so `make check' always
   reported "FAIL: test_i18n" with the usage line -- measured 2026-11-22
   on the merge build, and identically on build/mcde-host, so not a
   regression of that merge.  tools/mcde-tests.sh names the files and
   passes; the test now falls back to $srcdir (which automake's test
   driver exports) and finds them itself, the arguments still winning.

Test: make check in lib/libDtChat -> 24/24 PASS (was 23/24).  Both call
forms of test_i18n give "test_i18n: all ok": with the two arguments and
without them.  With /tmp/opencode renamed away the full check is green as
well, and the seven scratch directories appear under $TMPDIR when set.
2026-11-22 16:11:16 +00:00
lotherk 8677a22d84 Merge branch 'split/makronix-2026-11-22' into main
The 404 commits of the local Makronix tree's ext/src/mcde subtree
(tree 2694129d, the fork's 6a620b12 is the common base) onto the fork's
own 411.

Conflicts, all three resolved to this branch because the fork is the
newer side and the split would only have brought the older text back:

- programs/dtsystemsettings/panes.c: the split lacks the Dock pane
  (bc84289d's re-indent included).
- programs/dtsystemsettings/main.c: the split still calls MakeStartupDisk,
  which 345c5410 removed ("no call to the removed Startup Disk pane").
- programs/dttoolbox/dttoolbox.msg: the split still says "No ToolChest
  menu", bc84289d made message 2 match message 1's spelling.

Carried over from the split: dtphoto (1280 -> 13908 lines), dtpaint
(997 -> 3108), Mcde/Thumb.h and McdeThumb.c, printers.c, the de_DE
catalogs.

Test: git merge-base main origin/split = 9b8e5b12; per-file three-way
diff before resolving (only the fork's own text was dropped); no conflict
markers left (git grep -I -E '^(<<<<<<<|>>>>>>>|=======$)'); merge index
carries dtphoto.c and dtpaint.c from the split side.
2026-11-22 15:40:14 +00:00
lotherk 9e88c59fe9 MCDE dtphoto: every menu entry does something, and the test proves it
-menutest read only the command table against itself, so a menu line with
no command stayed invisible: it could be green while an entry did nothing.
It now reads dtphoto.menu and counts what resolves to no command -- 206
items, 0 unbound.  Counter-check: Select/Grow set to CMD_NONE makes it
print "1 unbound" and FAIL.

Four entries only refused before and now work: Window > Show Commands
opens a palette listing the command table itself (206 rows, measured
206x26 px of text in the widget, so it cannot drift from the menu),
Publisher Options sets the EPS resolution (72 and 288 dpi, the
%%BoundingBox scales with it), Adjustment Options the default for new
adjustment layers, and Show Channels/Show Paths show measurements from the
picture and the lasso path.  File > Acquire still refuses: there is no
scan source, and saying so beats a button that does nothing.

Real bug found on the way: Layer > Type > Horizontal/Vertical switched to
tool 7, which is crop; type is slot 8.

Measured on both depths (TrueColor :91, PseudoColor :98): 14 tests x 2 =
28 green, 0 red -- filtertest optest drawtest seltest movetest croftest
croptest typetest retouchtest selecttest selmodtest menutest exporttest
placetest printtest (the last with MCDE_PRINT_COMMAND=/tmp/dtpbin/lp,
230454 bytes spooled).
2026-11-22 15:26:45 +00:00
lotherk 0fa42ac765 pkgsrc: distinfo for the tree without the dead Startup Disk call
tools/mcde-dist.sh made the archive again after the dtsystemsettings fix;
this is its checksum.
2026-11-22 15:05:48 +01:00
lotherk 345c54105a dtsystemsettings: no call to the removed Startup Disk pane
The Startup Disk pane was taken out of the pane table (Konrad, 2026-11-21),
but ShowPane still had the branch that called MakeStartupDisk, and
startupdisk.c is no longer built.  A full `pkgchroot force wm/mcde' therefore
failed at link: "dtsystemsettings-main.o: undefined reference to
MakeStartupDisk" (measured 2026-11-22, the MacBook build).  The branch is
gone; the id stays in PaneMsg's stable list, the declaration in ui.h says why
the file is still in the tree.
2026-11-22 15:04:37 +01:00
lotherk 1abb2d5e03 MCDE dtphoto: the colour-model and layer entries under test, affine centre fixed
-filtertest now also covers the six entry points that sat outside every
test: CMYK Preview (must not flatten the picture to one colour), Gamut
Warning (saturated ink -> warning grey 128, printable pixel untouched),
the 5x5 Custom identity kernel, Perspective (0% identity, 50% reads the
top-left from inside the picture), a 90 degree Affine rotation as a
permutation, and Drop Shadow leaving the picture's own pixels alone.

That permutation check found a real bug: OpAffine mapped around w/2
instead of (w-1)/2, so a 90 degree turn of a 24-wide picture lost a whole
row to the background -- 552 of 576 pixels hit.  Every sampler that maps
by inverse mapping now uses the same centre.

Measured: 12 test modes x depth 24 and depth 8 = 24/24 green, build with
0 warnings (make dtphoto, forced rebuild).  The three false expectations
I wrote first were my arithmetic, not the code: gamut marks by ink above
0.9 (250,30,30 is 0.88), perspective squeezes towards the top so the
corner reads from inside, and (9,4) is 2 px from the edge.
2026-11-22 13:59:18 +00:00
lotherk 808c24dbf0 MCDE dtphoto: the other 43 filters proven, no build warnings
-filtertest hands a structured 24x24 picture to every remaining filter
-- the four blurs, unsharp, high pass, find edges, emboss, trace contour,
facet, fragment, median, offset, clouds, crystallize, pointillize, color
halftone, mezzotint, diffuse, extrude, tiles, wind, deinterlace, NTSC
colors, dust and scratches, the nine distortions and the Image mode
family -- and checks a property of the result, not "it changed":
grayscale leaves r == g == b, bitmap only 0 and 255, indexed 4 only the
ladder 0/85/170/255, offset is a permutation (same sum and sum of
squares), equalize never narrows the range, inverting twice returns the
picture.

Two of those are judged against what the display can hold.  On a
256-cell PseudoColor map a second inversion of a 576-colour picture
drifts 42/255 -- the map, not the operation -- so the involution runs on
a four-colour picture (floor 0) and grayscale gets the 10/255 the
nearest-cell search costs.  The test prints the floor it measured (0 on
TrueColor, 30 on PseudoColor) instead of carrying a guessed tolerance.

XmLoc is now the one place that casts a catalogue string for
XmStringCreateLocalized: Tr promises const because its English fallback
is a literal, the widget asks for char *.  Six dialogs warned before,
the file builds without a single warning now.

Measured on Xvfb 1024x768x24 (:91) and x8 (:98): menutest, viewtest,
optest, selmodtest, retouchtest, selecttest, movetest, croptest,
typetest, drawtest, filtertest all PASS on both depths (22), plus
selftest PASS (64x48) on both -- 24 of 24 green, 0 build warnings.
2026-11-22 13:51:29 +00:00
lotherk 4cfd730565 MCDE dtphoto: every menu path bound, the View switches drawn and read
All 206 paths of dtphoto.menu resolve to a command the callback switches
on.  The table had 43 doubled entries and 11 paths that named a menu
entry the menu does not have ("Image/Adjust/Image Size..." instead of
"Image/Image Size...", "@3.0" tags the reader already strips); both are
gone, CommandOf walks the table to its NULL entry, and -menutest now
proves the table against itself: 206 paths, 0 doubled, 0 bad, and an
unknown path stays CMD_NONE.  DTPHOTO_CMDS=1 used to bind 38, now 206,
none on CMD_NONE.

The View switches were flags nobody read.  SnapX/SnapY pull a marquee or
crop drag onto the grid or a guide a guide in reach wins over the grid,
Lock Guides refuses new and keeps existing ones), DrawGuides paints the
grid, the guides and the rulers on the canvas and not into the picture.

Two new headless tests, both green on depth 24 and depth 8:
  -viewtest  snapping arithmetic: 37 -> 32 on a 16 grid, 40 -> 48, a
             guide at 35 catches 37, a vertical guide leaves y alone,
             locked guides neither grow nor clear.
  -drawtest  counts the pixels on a real pixmap: grid 12509, one guide
             280 (= the canvas height), rulers 558 and none of them
             inside the canvas.

Measured: drawtest, viewtest, menutest, optest, selmodtest, retouchtest,
selecttest, movetest, croptest, typetest -> 20 green, 0 red (10 tests x
depth 24/depth 8); -selftest PASS on both, byte-identical output.
2026-11-22 13:09:53 +00:00
lotherk 28d82377d1 pkgsrc: distinfo for the tree with the icons, iconv and the README
tools/mcde-dist.sh made the archive again from mcde 285ea4b3: 67,010,712
bytes (the README and the two screenshots are in it now).  These are its
checksums.
2026-11-22 13:56:42 +01:00
lotherk 285ea4b3c0 README: MCDE, not CDE, with the screenshots and the licence
The README still described CDE: download it from SourceForge, build CDE, join
the CDE lists.  It now says what MCDE is (the fork Makronix ships), what it
changes (the 64x64 IRIX desktop with shaped icons and shadowed labels, the
top bar that is no focus target, the front panel with its Dock pane, System
Settings in one 1022x550 window, dtkeys on Apple hardware, dttoolchest), how
it is built (autogen/configure/gmake, and through the Makronix pkgsrc recipe
in make release), and under which licences.

Licence: the CDE parts stay LGPL 2.0 or later (COPYING); the files Makronix
wrote are under the CNCL 1.0 (LICENSE.CNCL, copied unchanged from the CNCL
repository).  A file that came from CDE keeps its notice.

docs/screenshots/desktop.png (1280x800) and system-settings.png (1022x550)
are from the MacBook running this tree: dtwm and dtbar built from it, the
icons at 1174,10 / 1174,98 / 1174,186, the settings window xwd of exactly
1022x550.
2026-11-22 13:51:32 +01:00
lotherk dd05d43cab libDtChat: link libiconv
libDtChat's text.c converts the session charset with iconv, and AM_ICONV
finds GNU libiconv, but libDtChat_la_LIBADD did not carry LTLIBICONV: the
library kept libiconv_open/-close/- undefined, and dtchat, dtchat-headless
and dtchat-irc failed to link ("undefined reference to libiconv_open",
measured 2026-11-22 on the MacBook).  The library carries the dependency now,
so every program that links it gets it too.

Measured: after the change lib/libDtChat/libDtChat.la lists
/usr/pkg/lib/libiconv.la in dependency_libs; make -C programs/dtchat rc=0,
0 errors (dtchat-build3.log).
2026-11-22 13:51:31 +01:00
lotherk 753c0f836e dtwm: the desktop icons stay above the wallpaper
The wallpaper is a window of its own (WmBackdrop.c), and the icons are
override-redirect windows.  XLowerWindow on an icon put it *below* that
window: the icon was mapped and invisible (measured 2026-11-22 on the
MacBook, the icon windows were IsViewable at 1174,10 and 96x96, and the
screen showed only the wallpaper).  DeskMap lowers the backdrops after the
icon now, so the order is root < wallpaper < icons < clients, as 4Dwm has it.

Measured: make -C programs/dtwm rc=0, 0 errors (the MacBook build of this
file, /tmp/dtwm-build7.log); the screenshot shows Computer, CD/DVD drive and
Trash at 1174,10 / 1174,98 / 1174,186.
2026-11-22 13:51:31 +01:00
lotherk 0d0a144d66 MCDE: PNG, JPEG and GIF in dtphoto, one picture writer in libDtSvc
dtphoto read only BMP and ICO and wrote only BMP; PNG, JPEG and GIF were
listed as open in docs/MCDE-PROGRAMS.md since 2026-11-12.  The reader was
already there: McdeThumbRead in libDtSvc has all five formats, is X-free and
is what dtfile uses for its miniatures.  dtphoto calls it for everything its
own reader does not know, so the program carries no second decoder.

There was no picture writer anywhere in the tree, so McdeThumbWrite now sits
next to the reader: PNG through libpng's simplified API, BMP in C99, the
ending decides, an unknown ending is refused instead of silently becoming a
BMP.

Measured on Xvfb depth 24 (2026-11-22):
- 40x30 PNG -> PNG, 1200 of 1200 pixels identical, CRC checked.
- 40x30 GIF -> PNG, 0 of 1200 pixels different.
- 40x30 JPEG q100 -> PNG, at most 3 steps per channel (compression, not the
  reader); the same picture written from libpng is 0 steps.
- Depth 8: a 32-colour picture comes back 0 of 256 pixels different; a
  1200-colour ramp differs by mean 28.6/255, which is the colormap -- the
  same ramp is 0 on depth 24.

test_thumb writes a 13x7 ramp (every pixel unique) as PNG and BMP and reads
it back pixel for pixel.  Proved the test bites: writing the BMP rows
top-down turns it red at 78 of 91 pixels, PNG_FORMAT_BGR at 91 of 91.  The
unknown-ending and zero-size cases are checked too.

dtphoto: the file dialog filters on every format it reads, not on *.bmp.
All 18 dtphoto test modes stay green on depth 24 and depth 8, test_thumb ok.
2026-11-22 12:06:04 +00:00
lotherk e0f4867ded MCDE dtphoto: the Image and Filter menus carry real operations
Image: Invert, Desaturate, Brightness/Contrast, Flip horizontal/vertical,
Rotate 180/90 CW/90 CCW, Image Size and Canvas Size.  Filter: Blur,
Blur More, Sharpen, Sharpen More, Find Edges, Emboss, Solarize, Add Noise,
Median/Despeckle, Mosaic.  All of them read and write through the same RGB
buffer, so no operation costs an X round trip per pixel.

Two bugs found while wiring them:
 - A per-pixel correction ignored the selection.  Invert, Desaturate,
   Brightness and Solarize changed the whole picture even with a mask.
   They now share OpPerPixel, so a new operation cannot forget the mask.
 - A menu entry was bound by its label, but the reference has "Horizontal"
   in Image > Flip and in Layer > Type.  CommandOf takes the full path now
   ("Image/Flip/Horizontal"), the reader stores it in Item.path.

Verified, depth 24 and depth 8, 16 runs, 0 red:
 - -menutest: 31 paths each resolve to the command the callback switches
   on; an unknown path stays CMD_NONE.
 - -optest against the arithmetic, not "the picture changed": a hard edge
   blurred to 170 (six of nine window pixels white), the same edge
   sharpened clamped to 255 and 0, mosaic cells to their mean (100,30,128),
   noise deterministic and inside the range, mask inside changed and
   outside untouched.
 - -selftest on a 1024x768 24-bit BMP: byte-identical (2,359,350 bytes,
   0 differing).
 - -retouchtest -selecttest -movetest -croptest -typetest still green.
 - DTPHOTO_CMDS=1 reports 37 bound entries, the 11 Filter paths among them.
2026-11-22 11:05:24 +00:00
lotherk be056d34ee pkgsrc: distinfo for the archive the source really is
tools/mcde-dist.sh's "archive unchanged" check hashed with sha256sum, which
NetBSD does not have: the key was empty, both sides compared equal, and the
distfile was never remade after the 64x64 icons and the AGENTS.md update.  The
archive the recipe named was 66,941,013 bytes and held the old AGENTS.md
(58,298 bytes) and the 32x32 pictures.

The fixed script made the archive again: 66,940,999 bytes, AGENTS.md 61,013
bytes, IrixDisk.m.pm begins "64 64".  These are its checksums.

Measured: tools/mcde-dist.sh from the parent at 7e20c712, mcde 3d79fc80.
2026-11-22 11:21:37 +01:00
lotherk d4790b53d3 MCDE dtphoto: the toolbox wired -- lasso, wand, move, crop, type, retouch
The selection was a rectangle, so the lasso, the magic wand and every
command that should honour a selected shape had nothing to work on.  It
is a bit mask now: the lasso collects a path, the wand floods by colour
distance, Select > Inverse and Edit > Clear read the same mask, and a
command paints only inside it.

Move and Crop had no press or motion branch at all -- two of the 22
buttons did nothing.  Move snapshots picture and mask at the press and
rebuilds from that snapshot on every motion event: rebuilding from the
last frame walks the pixels twice as far, and the release must not
recompute the offset, because a drag that ends on the frame gives a
position outside the canvas and moved the picture back.  Without a
selection it moves the whole picture, as the original does.  Crop drags
a rectangle and crops to it on release.  Type opens a prompt and draws
one line over an undo snapshot (the drawing moved out of the dialog
callback so it is reachable without a dialog).  The magnifier doubles on
the left button and halves on the right, the hand pans the view.

The six retouching tools (blur, sharpen, smudge, dodge, burn, sponge)
are new here -- dtpaint has none to copy -- and read a patch around the
dab in one GetImageRGB round trip, not one per pixel.

Two latent bugs found while testing: Unique() sorts the colour keys in
place but the bsearch afterwards ran over the reduced count, so lookups
past the holes failed (ReadPatch and GetImageRGB both had it), and
RGBToPixel returned 0 -- black -- when XAllocColor failed on a full
256-cell map, losing the pixel instead of taking the nearest cell.

Test evidence, headless, depth 24 and depth 8, all green:
  -movetest    10x10 block moved (10,5), mask travelled, background hole
  -croptest    40x30 -> 20x30, only blue kept
  -typetest    75 dark pixels, corner still white
  -selecttest  wand 800 of 2400 exact, inverse 1600, lasso in/out, clear
               only inside the mask
  -retouchtest all six tools move the values the expected way
  -selftest    1024x768 round trip PASS
Mouse-verified on Xvfb with xdotool: zoom 200% -> 400% -> 200%,
crop 1024x768 -> 200x150, move dragged twice (40,30 then 80,60) with
78,011 pixels changed.
2026-11-22 10:14:59 +00:00
lotherk 3d79fc80ca mcde: the archive with the 64x64 icons and the AGENTS.md 2026-11-22 10:05:47 +01:00
lotherk ff7c17dc4c mcde/AGENTS.md: the file follows the code again
Seven paragraphs were out of date after this session's changes:

- System Settings is one window (1022x550, min equal to max, panes scroll in
  an XmScrolledWindow, the tab strip is one of many); a pane's picture must
  exist, three did not and one was used twice.
- The Dock has a pane again, and it works: ~/.dt/panel-apps, remove, add,
  _DtWmRestartNoConfirm.
- Startup Disk is not a pane any more; startupdisk.c is no longer built.
- dttoolbox's window title is "dttoolchest".
- dtkeys asks the machine (hw.model "Mac...") before usbdevs, because the
  internal keyboard may not be enumerated when the session starts.
- The panel defines its own arrow and keeps the busy cursor's handle (the
  black 16x16 square came from the frame's cursor).
- The desktop draws the Foundation icons at 64x64 by file system, shapes the
  icon window to picture and label, and maps/lowers it, so a raised window
  covers it.
- dtbar sets _MCDE_NO_FOCUS and dtwm skips such a client in its
  focus-follows-pointer path: the bar keeps the last program's menu.
2026-11-22 10:04:49 +01:00
lotherk 2ce0575e8a desktop icons: the IRIX Foundation pictures at 64x64
tools/fti2xpm.py rastered at one size only (32x32).  It takes the size as a
third argument now, and the six pictures the desktop shows come from the
Foundation .fti sources at 64x64: IrixDisk (scsi.fti), IrixCD
(cdrom.loaded.fti), IrixDVD (dvd.loaded.fti), IrixFloppy (floppy.loaded.fti),
IrixTape (dat.loaded.fti) and IrixNet (device.remote.fti).  The array in the
file keeps the name of the old ones (IrixDisk_m_pm), so nothing that includes
them changes.

WmMcdeDesktop.c names them, and a medium picks its picture by file system:
cd9660 the CD, udf the DVD, msdos the diskette, tar/dump the tape, anything
else the disk.  The cell grows to 96x96 for the 64 pixel picture and the
label under it.

Measured: make -C programs/dtwm rc=0, 0 errors (build/logs/dtwm-icons64.log).
2026-11-22 10:02:59 +01:00
lotherk f8a45ae56c dtbar/dtwm: the bar is no focus target, so its menu can be used with the mouse
Moving the pointer from a program to the bar took the keyboard away from that
program: dtbar set the input focus to PointerRoot on EnterNotify and dtwm
cleared the active client, so the bar showed the M menu instead of the
program's and a click could not act on it (t0255/t0257).

Now dtbar marks its window _MCDE_NO_FOCUS and leaves the focus alone, and
dtwm's focus-follows-pointer path (HandleWsFocusIn) skips a client that
carries the property: the last program stays focused while the pointer crosses
the bar, the bar keeps showing its menu, and an item acts on the client the
menu came from (ItemActivated sends the ClientMessage to that window, not to
whoever has the X focus).

Measured: make -C programs/dtwm rc=0 and make -C programs/dtbar rc=0, 0
errors each.
2026-11-22 09:59:49 +01:00
lotherk f8183fa7d8 dtwm: the desktop's icons look like 4Dwm's and stay under the windows
- No tile: the icon window is shaped (XShapeCombineMask) to the picture and
  the label, so the backdrop shows between them; the label is drawn on it with
  one pixel of black under it instead of a filled box.
- Bottom of the stack: the icons were mapped with XMapRaised, and an
  override-redirect window is not restacked by the window manager, so they
  stayed above every client.  They are mapped and lowered now -- a raised
  window, a full screen program included, covers them, as 4Dwm's desktop does.

Measured: make -C programs/dtwm rc=0, 0 errors (build/logs/dtwm-zorder2.log).

Not yet: the 64x64 pictures.  The .pm files of programs/icons are 32x32 and
scaling them would only blur; the IRIX .fti sources raster at 64 with
tools/fti2xpm.py once it takes a size.
2026-11-22 09:56:42 +01:00
lotherk fed6f4c294 dtwm: the panel says which pointer it wants
The busy cursor was created and thrown away (_DtGetHourGlassCursor's return
value went nowhere), so BUSY_START defined cursor None on the panel and the
pointer fell back to whatever the shell had inherited.  On the MacBook that
was a black 16x16 square (measured with XFixes: 16x16, hotspot 8,8, every
pixel black, serial 16) over the whole front panel, while the root and the
xterm showed the arrow and the I-beam.

The return value is kept now, and the panel defines the standard arrow on
itself when it is mapped instead of inheriting one from its frame.

Measured: make -C programs/dtwm rc=0, 0 errors (build/logs/dtwm-cursor.log).
2026-11-22 09:53:16 +01:00
lotherk 7589f2ea15 dtwm: the panel finds a program's icon under either spelling
CDE names its icons with a capital (Dtterm.m.pm, Dtcalc.m.pm); a client's
WM_CLASS instance name is usually lower case and a kept program is written
with whatever the command names.  The panel tried the name as stored and in
lower case only, so a lower-case class with a capitalised icon file fell back
to Dtactn.  ClassIcon() tries the name as given, lower case and with a
capital, in that order, for the dock and for the drawers.

Measured: make -C programs/dtwm rc=0 on this tree (0 errors,
build/logs/dtwm-iconfix2.log).
2026-11-22 09:50:29 +01:00
lotherk bc84289d25 mcde: the review's loose ends
- dtsystemsettings/panes.c: the icon of every pane is unique again (Backup
  showed the same DtSystem.m.pm as System Information, Default Programs the
  same Dtmail.t.pm as Internet Accounts) and the dock entry is indented like
  its neighbours.
- startupdisk.c is no longer built: the pane was removed, the file stayed in
  the SUBDIRS list.
- dttoolbox.msg: message 2 says "No dttoolchest menu", like message 1 says
  "dttoolchest".
- dock.c stores the program's class as the command names it (lower case, as
  WM_CLASS's instance name is), not with an invented capital.  dtwm compares
  classes with strcasecmp (WmMcdePanel.c:144, 233), so matching works either
  way; the icon lookup by file name is what a made-up case could spoil.
2026-11-22 09:40:15 +01:00
lotherk 88b63a51b5 configure: a plain build installs into /usr/mdt
CDE's upstream default is /usr/dt.  On this development machine the desktop
lives in /usr/mdt (the running install is there since 2026-11-16), so a plain
./configure && make install went to /usr/local instead, next to the one that
is running.  The pkgsrc recipe still passes its own --prefix (/usr/pkg/dt).
2026-11-22 09:30:30 +01:00
lotherk 226b2116f1 MCDE dtphoto: open and save through one RGB buffer, not per pixel (P1)
dtphoto allocated a colour in the server for every pixel it opened and
queried one for every pixel it saved -- one X round trip per pixel, the
same fault dtpaint lost on 2026-11-21.  dtpaint was carried over; dtphoto
was not.

The document now goes through an 8-bit RGB buffer (SetImageRGB,
GetImageRGB) and converts colours through the visual's masks on TrueColor,
or in one XQueryColors/XAllocColor per *distinct* colour otherwise.  The
reader takes 24-bit BMP (bottom-up and top-down), 8-bit BMP uncompressed
and RLE8, and the first image of an ICO (1/4/8/24/32 bpp, alpha 0
composited on the document's background, a PNG-compressed icon refused),
as dtpaint does; the save keeps the 2835 dpi fields the old writer wrote.
The selftest compares every pixel now, not a sample, and its two callers
pass a real file each instead of relying on a scratch document.

Measured on Xvfb (1280x1024x24), a 1024x768 24-bit BMP with 589,824
distinct colours, `dtphoto -selftest big.bmp out.bmp`: 20.3 s before the
change (the old binary, same picture, 20.326 s), 58-109 ms after (5 runs).
The round trip is byte-identical: 2,359,350 bytes, `cmp` silent, dpi
fields included.  depth 8 (PseudoColor, Xvfb 1280x1024x8): PASS, exact for
4- and 65536-colour documents alike.  8-bit BMP, RLE8 BMP, ICO 8 bpp and
ICO 32 bpp read exact on both depths (0 wrong pixels, /tmp/dtptest).
make in build/mcde-linux/programs/dtphoto: cc and libtool link exit=0, no
new warning (the two const warnings in XmStringCreateLocalized calls are
older than this change).

Documented in AGENTS.md and docs/MCDE-PROGRAMS.md (C1).
2026-11-22 08:28:41 +00:00
lotherk 5ee5dfcb0a docs: dtpaint D3/D4 (tools, formats, print) recorded
C3's status gains the 2026-11-22 paragraph: airbrush/text/curve/polygon,
rect/free selection with XOR marquee, move and Delete/Select All, zoom
1x-8x, Attributes, Edit Colors, 8-bit BMP (uncompressed and RLE8) and ICO
read, 24-bit BMP save, and Print through mcde_sys_print_file with the
temporary file removed when the job ends.  The physical page on the HP
printer stays the user's step; the spool path is verified with a fake lp.
AGENTS.md: the same in the dtpaint paragraph and the catalog count (51
messages, 52 free).
2026-11-22 07:31:31 +00:00
lotherk 7c0281f48a MCDE: print a file through McdeSys; dtpaint Print... (D4)
McdeSys gains mcde_sys_print_file(path, printer): it looks for lp(1)
(/usr/bin, /usr/local/bin, /usr/sbin, pkg prefix; MCDE_PRINT_COMMAND
overrides it for tests), passes -d PRINTER when one is named, and runs it
as the existing job (fd into the event loop, finish/cancel).  dtpaint links
libMcdeSys, adds File > Print... (Ctrl+P): it picks the default queue from
mcde_sys_printers (or the first), writes the image to /tmp/dtpaint-PID.bmp,
starts the job and removes the file when the job ends; errors and 'no
printer is set up' go to the information dialog.  Measured under Xvfb with
MCDE_PRINT_COMMAND=fake lp: argv '-d HP_LaserJet_M110w_CC1016
/tmp/dtpaint-3543226.bmp', the fake copied a valid 640x480 BMP and the
temporary file was gone; no physical page was printed (the real queue is
the user's step).
2026-11-22 07:23:33 +00:00
lotherk fa06dc280a MCDE dtpaint: 8-bit BMP (incl. RLE8) and ICO read (D4)
OpenBMP now dispatches on the file: 24-bit BMP keeps the proven path
(OpenBMP24), 8-bit palette BMP decodes uncompressed and RLE8 (count/value,
end-of-line, end-of-bitmap, delta, absolute runs with word padding, top-down
and bottom-up), and the first image of a .ico decodes 1/4/8/24/32 bpp
(BGRA with alpha 0 composited onto the background; PNG-compressed icons are
refused because there is no PNG decoder).  All three go through one RGB
buffer and SetImageRGB, which allocates distinct colours in one batch on
PseudoColor.  Measured under Xvfb: ImageMagick's RLE8 160x100 gradient opens
and shows the gradient; a 64x64 32-bpp ICO opens with its four colours;
24-bit -selftest still passes.
2026-11-22 07:18:21 +00:00
lotherk a196caf47b MCDE dtpaint: image attributes and colour editor (D4)
Image > Attributes... (Ctrl+E) asks width and height (1..4096), builds a
new pixmap filled with the background, copies the overlap and discards the
selection; the resize is a document operation, so undo starts fresh after
it.  Colors > Edit Colors... opens three RGB scales initialised from the
current foreground; OK allocates the colour and updates the fg square.
Both dialogs are FormDialogs with OK/Cancel from the catalog; the form size
is set after popup so the shell does not shrink to its children.
Measured under Xvfb: 640x480 -> 300x300 canvas; Red 255 + OK draws a red
line and turns the fg indicator red.
2026-11-22 07:13:48 +00:00
lotherk 727965b212 mcde: the archive with the Dock pane 2026-11-22 08:09:02 +01:00
lotherk bd2afc27f2 dtsystemsettings: a Dock pane that works
The Dock entry is back, and it is a pane of its own: it lists the programs
kept in the front panel (the CLASS and COMMAND lines of ~/.dt/panel-apps),
removes the chosen one, adds one from a command, writes the file at once and
restarts the window manager (_DtWmRestartNoConfirm) so the panel is built
again.  The icon is Dtapps.m.pm -- the entry was PANE_LATER with
DtPanel.m.pm, which does not exist, so it was greyed out and had no picture.
2026-11-22 08:08:45 +01:00
lotherk d224248651 MCDE dtpaint: rectangular and free-form selection (D3)
Select drags a box, Free-Form Select traces a lasso; both draw an XOR
marquee (scaled with the zoom), keep the pixels, and can be dragged to move
them: the snapshot is the undo base, the selected pixels float in a pixmap,
and a 1-bit polygon mask clips clear/paste for the lasso.  Edit > Clear
Selection (Del) clears the selected pixels and deselects; Edit > Select All
(Ctrl+A) selects the whole image; the Clear Selection item is sensitive only
while a selection exists.  A non-selection tool's click deselects, as in the
reference.  Measured under Xvfb: box marquee, move of a scribble (outside
pixels stay), Delete clears it, lasso marquee around a dot and Delete clears
just that dot, Ctrl+A marks the image and enables the menu item.
2026-11-22 07:05:29 +00:00
lotherk ffbf8c7f2d MCDE dtpaint: curve and polygon tools (D3)
Curve is the reference's two-phase tool: drag the two end points, release,
then move to bend the quadratic Bezier and click to commit.  Polygon adds a
vertex per left click, previews the open outline with a rubber line to the
pointer, and closes on a right click or a double click; leaving the tool
restores the snapshot.  Both keep the one-step undo (snapshot at the first
press).  Measured under Xvfb: a bent curve from (300,200) to (500,300)
through (400,150); a closed quadrilateral; Undo removes the polygon and
keeps the earlier curve.
2026-11-22 06:59:01 +00:00
lotherk e987e0379f MCDE dtpaint: airbrush and text tools (D3)
Airbrush sprays random foreground/background dots in a 15-pixel square
while dragging; Text opens a prompt dialog, then fills the text box with
the background colour and draws the string in the foreground colour with
the GC's font (the image stays 1:1 at any zoom).  The prompt's OK button
is a gadget whose callback widget is the SelectionBox itself, so the text
field is found there, not under XtParent.  Measured under Xvfb: spray dots
on the canvas; 'Hello dtpaint' appears at the clicked point.
2026-11-22 06:56:08 +00:00
lotherk 6fb09e6d9d MCDE dtpaint: zoom 1x/2x/4x/8x (D3)
The magnifier cycles the factor (left up, right down); View > Normal Size
(Ctrl+PgUp) and Large Size (Ctrl+PgDn) set 1x and 4x.  The canvas grows to
image*zoom inside the scrolled window; Expose samples only the exposed
rectangle into an XImage (nearest pixel), and pointer events divide by the
factor, so drawing and the status line stay in image coordinates.
Measured under Xvfb: 1x 640x480 -> 2x 1280x960 -> 4x 2560x1920, a line
drawn at 4x appears at the same image coordinates at 1x.
2026-11-22 06:51:21 +00:00
lotherk fd66cdb200 MCDE dtpaint: Ctrl+S kept the path and title (t0704 follow-up)
DoSave(curPath) passed curPath as both the destination and the source of
snprintf, which is undefined; glibc emptied it, so after Ctrl+S the title
fell back to 'untitled' and the next Save opened Save As again.  Copy only
when the pointers differ.  Found while verifying the PseudoColor path on
Xvfb depth 8 (4-colour BMP round trip exact, selftest PASS); recorded in
AGENTS.md.
2026-11-22 05:50:22 +00:00
lotherk 4aa00e0649 mcde: the archive of 94ab6eb75e 2026-11-22 06:46:42 +01:00
lotherk d574ce9587 dtsystemsettings: include Xm/ScrolledW.h for the pane scrolled window
The pane scrolls since 8f03d0d74e; the widget class was not declared
(measured 2026-11-22 on the MacBook: xmScrolledWindowWidgetClass
undeclared).
2026-11-22 06:46:01 +01:00
lotherk f599906311 mcde dtsystemsettings: include ScrolledW.h (missing, broke every full build)
main.c uses xmScrolledWindowWidgetClass (paneScroll, added in ad02893dde)
but never included <Xm/ScrolledW.h>, so any full make install / the MCDE
PLIST gate died at dtsystemsettings-main.o with 'xmScrolledWindowWidgetClass
undeclared'.  One include, alphabetical among the Xm headers.  Found while
running the PLIST gate for the dtpaint review (t0704); -fsyntax-only clean.
2026-11-21 21:42:46 +00:00
lotherk ae38eccebe MCDE dtpaint: the review's defects -- crash, undo, menus, save, i18n, speed (t0704)
Review of programs/dtpaint found and this fixes:
- Picker crash: a click in the grey strip below the image reached
  XGetImage outside the pixmap (BadMatch, X_GetImage).  The canvas is now
  a drawing area of exactly the image size inside a scrolled window, and
  CanvasInput bounds-checks; large BMPs scroll instead of being clipped.
- Undo: one snapshot taken before every image-changing operation (pencil,
  brush, eraser, fill, shapes, invert, flip, clear) and refreshed after a
  load; previously only shape tools snapshotted and OpenBMP left snap
  uninitialized, so Undo after Open turned the image black.
- Menus: Clear Selection and Edit Colors were wired to Clear Image and
  About; they are now insensitive until D3/D4.  Help Topics is real.
  Accelerator text shown; Clear Image uses 'Ctrl Shift<Key>N' (the old
  'Ctrl<Key>Shift<Key>N' never fired).
- Save remembers the path and title, asks before New/Open/Exit when
  dirty (Discard/Keep), and reports open/save errors in a dialog instead
  of stderr; the per-tool-change stderr debug is gone.
- Colour model: fg/bg are pixels (picker takes any colour, right button
  sets background) with a drawn fg/bg indicator; toolbox is radio with
  the indicator hidden (one sunken tool); swatches are 16x16.
- Open/Save/Invert no longer do one X round trip per pixel: TrueColor
  converts through the visual's masks, other visuals batch the distinct
  colours.  Measured on a 1024x768 BMP: open 18.3 s -> 0.02 s, invert
  14.9 s -> 0.05 s, save 6.3 s -> 0.23 s.
- FloodFill is scanline with a growing seed stack, not 4 neighbours per
  pixel; XmString leaks freed; message dialogs destroy their shell.
- Catalog grows to 34 messages; the German copy transliterates umlauts
  (core font has no UTF-8 rendition), re-measured under de_DE.UTF-8.
-selftest now also checks the BMP round trip and double invert/flip: PASS.
Builds clean under -Wall -Wextra -Werror; PLIST gate ok (3714 installed).
Left column is a Form so the colour box never overlaps the canvas.
2026-11-21 21:42:34 +00:00
lotherk 38c7bd1901 mcde: the archive of 8f03d0d74e
The recipe had the archive of the commit before the System Settings change.
2026-11-21 21:46:03 +01:00
lotherk 68d4953b99 mcde: one window size for System Settings, tabs that are one of many, icons that exist
- dtsystemsettings: the shell is 1022x550 and stays so (min/max equal); every
  pane lives in it instead of growing the window (thirteen per-pane
  XtVaSetValues(shell, width, height) calls are gone), and a taller pane
  scrolls (the pages sit in an XmScrolledWindow with XmAUTOMATIC).
- panes.c: CDs & DVDs had no icon (Dtmedia.m.pm does not exist) - it shows
  IrixCD.m.pm; Energy Saver shows SDtpowermgr.m.pm; Accounts had the same icon
  as Startup (DtStart.pm) and shows McdeUser.t.pm.  The "Startup Disk" entry
  and the disabled "Dock" entry (no icon, PANE_LATER) are removed.
- McdePrefs: the tab strip is one of many (XmNradioBehavior,
  XmNradioAlwaysOne).  Without it every visited tab stayed pressed
  (measured 2026-11-21: Keyboard, Mouse and Shortcuts all down at once).
- dttoolbox: the window title is "dttoolchest" (msg 1 of the catalog).
- McdeSys: mcde_sys_keyboard_is_mac asks the machine (hw.model "Mac...")
  before usbdevs.  At session start the internal keyboard may not be
  enumerated yet, so dtkeys took a MacBook for a PC keyboard and exchanged
  Alt and Command (_MCDE_KEYS said "pc", measured 2026-11-21).
2026-11-21 21:44:16 +01:00
lotherk d41ebfa451 mcde: one window size for System Settings, tabs that are one of many, icons that exist
- dtsystemsettings: the shell is 1022x550 and stays so (min/max equal); every
  pane lives in it instead of growing the window (thirteen per-pane
  XtVaSetValues(shell, width, height) calls are gone), and a taller pane
  scrolls (the pages sit in an XmScrolledWindow with XmAUTOMATIC).
- panes.c: CDs & DVDs had no icon (Dtmedia.m.pm does not exist) - it shows
  IrixCD.m.pm; Energy Saver shows SDtpowermgr.m.pm; Accounts had the same icon
  as Startup (DtStart.pm) and shows McdeUser.t.pm.  The "Startup Disk" entry
  and the disabled "Dock" entry (no icon, PANE_LATER) are removed.
- McdePrefs: the tab strip is one of many (XmNradioBehavior,
  XmNradioAlwaysOne).  Without it every visited tab stayed pressed
  (measured 2026-11-21: Keyboard, Mouse and Shortcuts all down at once).
- dttoolbox: the window title is "dttoolchest" (msg 1 of the catalog).
- McdeSys: mcde_sys_keyboard_is_mac asks the machine (hw.model "Mac...")
  before usbdevs.  At session start the internal keyboard may not be
  enumerated yet, so dtkeys took a MacBook for a PC keyboard and exchanged
  Alt and Command (_MCDE_KEYS said "pc", measured 2026-11-21).

Measured on the MacBook: keyboard _MCDE_KEYS "pc" with an Apple Internal
Keyboard / Trackpad on usb1 port 2 addr 7.
2026-11-21 20:15:43 +00:00
lotherk fd55404245 mcde recipes and the cross configuration: the X of the build host, named once
These are the changes the cross (Linux) path needed before the chroot path
made them unnecessary on Makronix; they are kept because that path still
builds for the same sysroot on a host that is not Makronix.

tools/pkgsrc-cross.mk.conf names the host side in one place instead of in the
recipes: HOST_TOOLS_BIN on PREPEND_PATH (autoreconf stopped with "Can't exec
libtoolize"), HOST_X11BASE (the include path of the host's X), HOST_X11_LIBS
and HOST_FL_A (the archives the host tools link) and HOST_BUILD_CFLAGS
(-std=gnu17 -fPIE: the 1990s C of the forks, and NetBSD links PIE by default
so tradcpp failed with "relocation R_X86_64_32 ... can not be used when
making a PIE object").  /usr/pkg/lib comes before the base X when linking: a
library pkgsrc builds because the base copy is too old must be the one a
package links (the base freetype is 2.10.4, pkgsrc's 2.15.0 was ignored and
libfontconfig.so needed .19).  x11-links keeps the sysroot override only on a
host without X of its own (on Makronix it doubled the path, 7 instead of 111
pkg-config links, x11/libXft then "Package 'x11' not found").

ext/src/mcde/pkgsrc-motif and ext/src/mcde/pkgsrc use those variables; the
build tools (makestrs, wml, wmldbcreate) are built and run by the host, so
their CFLAGS come from HOST_BUILD_CFLAGS and their include path from
HOST_X11BASE.

Measured on makronix-build before the chroot path: mcde-motif rc=0 in 529 s,
wm/mcde rc=0 in 1506 s.
2026-11-21 01:49:20 +01:00
lotherk 16826ffd01 motif recipe: the build tools link the host archives where the host has X
The cross branch named ${MAKRONIX_TOP}/build/pkg/lib/libXt.a and friends.  That
is a Linux host, where userland builds them as host tools; on Makronix the
builtin libXt is used, the bootstrap has no libXt.a, and makestrs stopped at
the link ("cannot find /usr/src/build/pkg/lib/libX11.a", measured 2026-11-20).
Where /usr/X11R7/lib/libXt.a and /usr/lib/libfl.a exist, they are named
instead; the bootstrap path stays for the Linux host.
2026-11-20 16:12:57 +01:00
lotherk 3a9f769c51 mcde recipes: the build tools take the X of the build host
makestrs, wml and wmldbcreate are built and RUN by the build host, and in a
cross build prefix is the target ( /usr/pkg ): there /usr/pkg/include has no
X11, and makestrs stopped with "X11/Xos.h: No such file or directory" on
Makronix (measured 2026-11-20) while the Linux host had the buildlink stub in
that directory.  Where the host has its own X (/usr/X11R7), the tools use it;
else the old -I${PREFIX}/include stays.
2026-11-20 15:40:03 +01:00
lotherk ba6190a157 userland: the set is built for the sysroot on every host; dist scripts hash without digest(1)
tools/userland.sh decided by uname: on NetBSD it took a "native" branch that
built the forks for the bootstrap's prefix (build/pkg), never installed
anything into build/obj/destdir/usr/pkg and never ran tools/makronix-set.sh.
Measured 2026-11-20 on makronix-build: userland exit=0, then build.sh release
stopped at checkflist with "9422 missing files", all under ./usr/pkg.  The
cross branch builds what the set needs -- the sysroot, PREFIX /usr/pkg, this
tree's own toolchain from build.sh (tooldir.NetBSD-11.99.9-amd64 on Makronix)
-- and that is the same build on Linux and on Makronix (AGENTS.md: cross and
native are one build).  It is the default now; USERLAND_MODE=native keeps the
old branch for packages of the running host.  mk-host.conf takes the archives
from distfiles/ of the tree.

tools/ext-dist.sh and tools/mcde-dist.sh: digest_of() (digest when it exists,
else SHA512 from cksum) and no hash line without a value.  This was meant for
0c91b0cddf and stayed staged when that commit stopped at the ignored recipe
paths.  ext/src/mcde/pkgsrc-motif/distinfo names the archive in distfiles/.
2026-11-20 10:31:44 +01:00
lotherk e8d19bc74f ext: the recipes of the forks are tracked again, with their distinfo
The root .gitignore said "pkgsrc/", which git applies at every level, so
ext/src/*/pkgsrc -- the recipes of MCDE, afpfs-ng and splinter -- were ignored
and never in the repository; a fresh clone had no recipe for any fork and the
source set could not carry one.  The rule is "/pkgsrc/" now: the checkout at
the top stays out, the recipes belong in.

The three distinfo files name the hashes of the archives this run packed, and
the archives themselves are the ones in distfiles/ (regenerated with digest, or
with cksum when digest does not exist yet).
2026-11-20 05:59:49 +01:00
lotherk 9b8e5b12ff mcde: distinfo of the archive with dtlogin's LANG order
test-desktop-login on the installed VM with this dtlogin: 12 of 12 PASS,
the session runs with LANG=en_US.UTF-8 (build/logs/desktop-login-2026-11-18f.log).
2026-11-18 12:38:05 +00:00
lotherk f2a9e14426 dtlogin: LANG before PATH in the session environment (ksh93 dropped it)
The session ran with LANG=C although dtlogin passed LANG=en_US.UTF-8 to
Xsession (dtlogin -debug 3: 'LANG=en_US.UTF-8'; ps -e on Xsession showed it).
Xsession is a ksh93 script, and ksh93 93u+m 1.0.10 on NetBSD rejects LANG as
'en_US.UTF-8: unknown locale' and leaves it empty when PATH comes earlier in
the environment (put_lang -> libast setlocale); Xsession then set LANG=C.
Measured in the installed system: env -i PATH=/bin:/usr/bin LANG=en_US.UTF-8
ksh93 -> empty, LANG before PATH -> kept, no PATH -> kept.  verify.c now
creates LANG right after LOGNAME; setLang() replaces the value in place.

Tests: test-desktop-login's LOGIN and CORES checks matched padded ps and wc
output ('CORES= 0'); install-simple's .local lookup is bounded to 5 s per
round (the loop outlasted ENDCHK's 300 s without a network).
2026-11-18 12:28:02 +00:00
lotherk b6cbd0eb87 mcde: distinfo of the archive with the session fixes (libSM ID, locale, fonts, catalogues, ICE) 2026-11-18 06:49:26 +00:00
lotherk 2b141773ce dtlogin: /tmp/.ICE-unix for the session manager
libICE creates it only as root and NetBSD creates it nowhere; the session
log said '_IceTransmkdir: ERROR: euid != 0, directory /tmp/.ICE-unix will not
be created' and dtsession had no local ICE socket, its clients going over
TCP to the host name (2026-11-18).  dtlogin (root) makes it 1777 next to
/var/dt, as libICE itself would.
2026-11-18 06:38:50 +00:00
lotherk 6f27882115 mcde: message catalogues in NetBSD's format (nbgencat from the tooldir)
configure took the build host's gencat; on Linux it wrote glibc catalogues
(magic 0x960408de, dtfile.cat in the makronix set) which NetBSD's catopen(3)
rejects (src/lib/libc/nls/catopen.c:183, _NLS_MAGIC 0xff88ff89): catgets()
always returned the built-in English, translations never showed.  The
tooldir's nbgencat writes the NetBSD format; a native NetBSD host keeps its
own gencat.
2026-11-18 06:38:20 +00:00
lotherk ecaba781e0 dtsession: *Font and *FontSet name their charset (menus were Chinese)
sys.resources/sys.font gave *Font and *FontSet as
'-dt-interface user-medium-r-normal-m*-*-*-*-*-*-*-*-*'.  The first match the
server lists for that alias is ...-gb2312.1980-0, a two-byte font: Motif drew
ASCII two bytes per glyph and every menu bar, label and the dtbar status read
as Chinese ('Fi' = 0xC6E9 = GB2312 '崎').  With iso8859-1 named, dtfile's labels
read 'Back', 'Forward', 'DEVICES' (xrdb -merge in the installed VM,
2026-11-18).
2026-11-18 06:37:48 +00:00
lotherk 30c7ae32f1 mcde: en_US.UTF-8 by default, paths in the actions, the cursor path
- dtlogin Xconfig: Dtlogin*language en_US.UTF-8 on NetBSD.  dtlogin has
  no DEF_LANG there and rc.d passes no LANG: every session ran with LANG=C
  (Konrad, 2026-11-18: 'default soll en_US.UTF-8 sein').
- types/Makefile.am: tradcpp does not expand macros inside '...', and the
  actions quote their commands; 'CDE_INSTALLATION_TOP/bin/dthelpgen' reached
  dthelp.dt, dt.dt, dtfile.dt, uxstd.dt, develop.dt, xclients.dt unexpanded
  ('sh: CDE_INSTALLATION_TOP/bin/dthelpgen: not found' in ~/.dt/errorlog).
  The paths are filled in by sed after cpp.
- 0079.dtcursor: $CDE_INSTALLATION_TOP is no session variable (the path
  was /share/icons); derived from DT_BINPATH.
2026-11-18 06:28:45 +00:00
lotherk 24e1c5a51f libSM: client IDs from uuid_create(3); dtsession refuses a NULL ID
The login went back to the greeter: dtsession dumped core
(~/dtsession.core, SIGSEGV in strlen <- strdup <- SmsRegisterClientReply
<- SmXSMP.c:562, return address 0x1fb5c in the PIE).  NetBSD builds libSM
without UUID support, so SmsGenerateClientID derives the ID from the host
name's address and returns NULL when the name does not resolve (sm_genid.c,
getaddrinfo) -- an offline machine whose name is not in /etc/hosts, the
installed test VM, the workstation without network.

- src/external/mit/xorg/lib/libSM/Makefile: -DHAVE_UUID_CREATE, libc's DCE
  uuid_create/uuid_to_string (the branch sm_genid.c has for FreeBSD).
- dtsession SmXSMP.c: a NULL ID refuses that client instead of killing the
  session manager.
2026-11-18 06:18:50 +00:00
lotherk 9a950d0046 dtlogin: the NetBSD server keeps the pseudo-user (as CDE has it)
Running it as root made it enforce access control, and the display manager's
own connection then failed before the greeter ('Authorization required, but
no authorization protocol specified').  As nobody it cannot read the -auth
file and serves without access control, which is how this display has always
worked; the session now uses the user's ~/.Xauthority (previous commit).
2026-11-18 05:43:16 +00:00
lotherk 7eb890e507 dtlogin: the parent presents the cookie to its own server
With the server running as root it enforces access control (it can read
-auth now), and WaitForServer's XOpenDisplay in the parent had no
authorization: 'Authorization required, but no authorization protocol
specified' and 'Server for display :0 can't be started' (2026-11-18).
SetAuthorization(d) is called before the wait, as the server child already
did.
2026-11-18 05:29:32 +00:00
lotherk 21de6b6edd dtlogin: the session keeps the user's Xauthority
SetUserAuthorization() writes ~/.Xauthority for the user (and sets
XAUTHORITY itself when it has to use the fallback file), but the session
environment then named the server's auth file -- 0600 root, unreadable for
the user.  dtsession could not open the display and dtlogin went back to the
greeter (measured 2026-11-18; dtsession runs fine when XAUTHORITY names
~/.Xauthority).
2026-11-18 05:04:33 +00:00
lotherk 1f2b96e8c2 dtlogin: the server as root, and /var/dt writable for the session
Two causes of 'the login goes back to the greeter', both measured in the
installed VM 2026-11-18:

- Xservers.src ran the server as the pseudo-user nobody on NetBSD; it could
  not read its own -auth file (0600 root) and the session could not open the
  display.  NetBSD's xdm runs the server as root; NetBSD gets
  local_uid@console root now, as Solaris and OpenBSD already had.
- dm.c's dtMakeDefaultDir made /var/dt/appconfig and appmanager 0755 root;
  dtsession creates its directory there as the user and died with
  'MakeDirectory: /var/dt/appconfig/appmanager/<user>-<host>: Permission
  denied'.  appconfig and appmanager are 0777, tmp is 1777.
2026-11-18 04:32:38 +00:00
lotherk 03ce0155cc mcde: distinfo of the archive with the sessreg and userPath fix 2026-11-18 02:16:08 +00:00
lotherk 4119ece49a mcde: sessreg's path -- the session setup failed and dtlogin went back to the greeter
Xstartup's last line is 'exec sessreg -a ...' and Xreset's 'sessreg -d ...'.
configure (AC_CHECK_PROGS(SESSREG, sessreg)) recorded the bare name from the
build host, and Dtlogin*userPath had no /usr/X11R7/bin -- where NetBSD's
sessreg is.  The session setup died with 'Xstartup[57]: exec: sessreg: not
found', dtlogin restarted the greeter: the password was accepted and the
login bounced (measured in the installed VM 2026-11-18, Xerrors).

- pkgsrc/Makefile: ac_cv_prog_SESSREG=/bin/sessreg
- dtlogin/config/Xconfig.src: NetBSD's userPath carries /usr/X11R7/bin
  (xrdb, xset, xmodmap too)
- tools/install-simple.sh: answer the museum question (it hung there)
- tools/test-desktop-login.sh: the greeter test rebuilt: root shell first,
  wait for X and dtgreet before typing (keys sent too early were lost), -g
  restarts dtlogin with -debug.
2026-11-18 02:02:19 +00:00
lotherk f8f0194533 ext: distinfo of the archives of HEAD (make userland, build/logs/userland-2026-11-17j.log exit=0) 2026-11-17 17:12:52 +00:00
lotherk 6b69dc7f1e mcde recipe: the path replacements touch text only, once
pre-configure ran sed over every file under WRKSRC holding /usr/dt or
/etc/dt.  From an extracted archive that is text; in a built tree,
configured again by ext-resync/fork_reconfigure, it garbled 35 objects and
libraries (ld: 'file format not recognized', userland-2026-11-17g.log:33,
h.log:148), and since ${PKG_SYSCONFDIR}/dt holds /etc/dt again, the second
pass wrote /usr/pkg/usr/pkg/etc/dt into 276 files of the work directory.
Now grep -I (text only), the package's path set aside before the
replacement (idempotent), and a file the replacement does not change is not
rewritten (no new time stamp, nothing recompiled).  Tested in a scratch
tree: two passes, a binary with /etc/dt untouched, the time stamp kept.
2026-11-17 17:05:27 +00:00
lotherk 8169c04b38 mcde: a cross build makes no test programs; check-buildtools stopped on 28
build/logs/userland-2026-11-17f.log:22437: the 25 test programs of
libDtChat, dtchat-demo and McdeSys's test_audio/test_netwatch were
noinst_PROGRAMS, so the package build compiled them for NetBSD and
tools/check-buildtools.sh took them for build tools.  configure.ac has
MCDE_CROSS now; in a cross build they are check_PROGRAMS (dtchat-demo
EXTRA_PROGRAMS), in a native one noinst as before, so tools/mcde-tests.sh
still finds them in build/mcde-host.  autoreconf -fi of the tree: exit 0,
the Makefile.in lines are @MCDE_CROSS_TRUE@check_PROGRAMS /
@MCDE_CROSS_FALSE@noinst_PROGRAMS.
2026-11-17 16:55:45 +00:00
lotherk 9005246c8d dtchat: dtchat.1 is documentation, installed with --enable-docs only
Every manual page of MCDE is ${PLIST.docs} in the PLIST; dtchat's man_MANS
installed it in a --disable-docs build too, and pkgsrc's check stopped
wm/mcde (build/logs/userland-2026-11-17e.log:22217).
2026-11-17 16:41:17 +00:00
lotherk fc0c936693 mcde: PAM files for Linux again, MAIL where the mail indicator looks, 0079.dtcursor installed
dtlogin.src/dtsession.src: NetBSD keeps `include display_manager'; every
other system gets the stack of the CDE import (7a787b72c5) again -- Linux
has no display_manager file, so a native build had a PAM file that denied
every login.

Xsession.src: MAIL is $HOME/.mail/INBOX, the file dtwm's mail indicator
watches (Dtwm.defs.src:184, 6266bc5031); the folder and the file are made
at login.

Makefile.am: 0079.dtcursor (t0301) was in the tree and in the PLIST but
not in dist_xsess_SCRIPTS, so it was never installed.
2026-11-17 16:37:51 +00:00
lotherk ec23c381ca mcde: build wm/mcde without Go; the WhatsApp adapter is its own package
configure found the build host's go, and programs/dtchat built
dtchat-whatsapp with it: a host binary, from modules pkgsrc's build phase
may not download (http_proxy=downloads-forbidden-except-during-fetch,
build/logs/userland-2026-11-17c.log:19467).  PLIST.whatsapp is never set,
so the package never wanted the file.  The two commits that let go
download (38d293c454, 6f23f4e232) are reverted.
2026-11-17 16:29:55 +00:00
lotherk dbc1954c1d Revert "mcde: allow Go module downloads for dtchat-whatsapp (remove GOPROXY=off)"
This reverts commit 38d293c4549c40975fd91b54938904aeb8b2892c.
2026-11-17 16:28:23 +00:00
lotherk 26a4f82170 Revert "mcde: try GOPROXY=direct for dtchat-whatsapp when proxy is blocked"
This reverts commit 6f23f4e232fa908efc5f758da28db5decd1c90df.
2026-11-17 16:28:22 +00:00
lotherk 1939c30a6a mcde: try GOPROXY=direct for dtchat-whatsapp when proxy is blocked 2026-11-17 16:05:10 +00:00
lotherk f590a4472b mcde: allow Go module downloads for dtchat-whatsapp (remove GOPROXY=off) 2026-11-17 15:09:49 +00:00
lotherk 284fe5d634 mcde: add missing Irix-themed icon files referenced in Makefile.am (T2.7) 2026-11-17 14:34:20 +00:00
lotherk 4774c2c7d8 dtchat: verify adapter files whose hash arrives at the end (T4.5)
Telegram and WhatsApp learn a document's SHA-256 only when the transfer is
finished, so their file-offer carries none and the digest comes with
file-end.  The UI used to verify only the offer hash, which meant those two
paths wrote the bytes unchecked.  accounts_run now takes the offer's hash
when there is one and the file-end's otherwise, hashes the .part file after
the last chunk and renames only on a match; a mismatch still removes the
part file and reports it in the status line and the transcript.

The fake adapter gained the matching modes: latehash offers without a hash
and sends the right one in file-end, badendhash sends a wrong one there.
tests/file_ui.sh drives all four shapes through the real UI under its own
Xvfb with DTCHAT_TEST_FILE_ACCEPT: files and latehash write the verified
hello world, badhash and badendhash are rejected and leave neither the file
nor a .part.  Measured with the built binaries: four ok, exit 0.

Harness entry DtChat/file_ui added; the full run is 53 ok/0 bad
(make mcde-host exit=0, build/logs/mcde-host-2026-11-17-endhash.log).
2026-11-17 13:08:55 +00:00
lotherk 63fedd905a dtchat: test the packaged adapter layout (T10.8)
tests/packaged_layout.sh starts dtchat under a private Xvfb with one account
whose "adapter" field is empty.  The runtime has to resolve
<dir of dtchat>/dtchat-telegram and start it; DTCHAT_TELEGRAM_FAKE=1 makes
the adapter speak without an account, and DTCHAT_ACCOUNTS_DEBUG logs the
resolved path.  The test accepts both layouts: the libtool build (the
wrapper in programs/dtchat starts the real binary from .libs, where the
adapter sits) and the installed prefix (build/mcde-root/dt/bin), and it
matches the path the runtime actually logged instead of assuming one.

Measured: the libtool layout started
build/mcde-host/programs/dtchat/.libs/dtchat-telegram, the installed prefix
started build/mcde-root/dt/bin/dtchat-telegram, both from an empty adapter
field, and the adapter answered with its connecting state; all ok.  The
test uses its own display number so it can run beside other Xvfb sessions.
Harness entry DtChat/packaged_layout added (52 entries).
2026-11-17 13:04:08 +00:00
lotherk a1403f5177 dtchat: do not disconnect a NULL XMPP connection (T4.6)
The adapter's exit path called xmpp_disconnect(conn) unconditionally; when the process ended before connecting (hello only, stdin closed), libstrophe crashed on the NULL connection. The call is now inside the existing conn != NULL branch, so the installed dtchat-xmpp answers hello and exits cleanly.
2026-11-17 12:48:01 +00:00
lotherk 5a07cc7938 mcde: install the protocol adapters next to dtchat
dtchat-telegram joins bin_PROGRAMS (always built: TDLib when available, otherwise a stub that reports the missing library); dtchat-xmpp is installed when MCDE_STROPHE built it; the Go-built dtchat-whatsapp is installed by install-exec-hook when MCDE_GO is set. The PLIST lists dtchat-telegram unconditionally and the other two behind PLIST_VARS xmpp/whatsapp (left unset in the recipe, so a target without libstrophe/Go omits them while the host build installs all three). The accounts editor's default adapter path becomes <bindir>/dtchat-<protocol> in the packaged layout. Host build and mcde-linux install/plist follow.
2026-11-17 12:36:46 +00:00
lotherk 056bd30a8f dtchat: exercise WhatsApp incoming files with a real fake file (T9.1)
DTCHAT_WHATSAPP_FAKE_FILE makes the fake adapter offer that file (name, size, SHA-256), and on file-accept read it in 4 KiB blocks, emit file-data and a file-end carrying the hash; the real accept path (DownloadAny) now also sends the SHA-256 in file-end, and the static fake keeps its hello-world hash. tests/whatsapp_fake.py uses a 9000-byte deterministic file, checks the offer name/size/hash, reassembles every chunk byte-for-byte and verifies the file-end hash (31 checks, green stand-alone). Harness entry already exists; in-tree build and harness follow.
2026-11-17 12:29:27 +00:00