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>
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.
SvcPam.c: a fresh PAM handle per authenticate, pam_end on failure, the PAM_USER
check was inverted, the conv default case did not advance, failures go to
authlog (follows xsrc/external/mit/xdm greeter/greet.c).
pkgsrc/Makefile: ac_cv_path_XRDB=${X11BASE}/bin/xrdb - the cross build baked the
Linux host's /usr/bin/xrdb into dtlogin; /var/dt/Xerrors on an installed system
said 'sh: /usr/bin/xrdb: not found', so Xresources never loaded and the CDE logo
showed (measured in a VM 2026-11-17).
tradcpp/config.h: CONFIG_OS is the ident as given; the stringify macro turned the
quoted -DCONFIG_OS_IDENT into an invalid macro name and wm/mcde stopped in
lib/tt (tradcpp: Invalid macro name "__NetBSD__", build/logs/userland-2026-11-16-atomic.log)
so the sysroot kept the Nov 15 MCDE. t0436 t0438 t0217
Motif 2.3 has wheel translations for XmText and XmList (in MCDE's Motif),
but a custom drawing area in an XmScrolledWindow has none, and buttons 6/7
(a tilt wheel or a touchpad's horizontal scroll) are not even an event type
Xt's translation table knows. DtInitialize now installs
lib/DtSvc/DtUtil2/McdeWheel.c for every CDE program: it hooks the
ButtonPress/ButtonRelease wire conversion (XESetWireToEvent), looks up the
widget under the pointer, scrolls it by three increments in the event loop
(a 0 ms timeout -- the wire conversion must not run scrollbar callbacks, the
first horizontal bar change deadlocked there, measured), and turns the wheel
event into a NoExpose so no widget sees it twice.
- nearest XmScrolledWindow: its vertical/horizontal scrollbar, value moved
and clamped to maximum - sliderSize (XmScrollBar refuses more; measured
warning), XmScrollBarSetValues(notify) -- custom panes, lists, containers
follow their bar;
- XmText: its topCharacter moved by three lines (the scrolled window's bar
does not move a text's view), so dtpad/DtEditor and every text pane scroll;
- a scrollbar under the pointer is moved itself;
- 4 up, 5 down, 6 left, 7 right, Shift+4/5 horizontal too.
Measured on an out-of-tree copy of the configured build (the tree's build
lock was held by another session's release and host runs): the library
builds, and under Xvfb a scrolled XmText with 200 lines
- three times button 4: "text scroll text -3" three times, the view moved
(screenshot: lines 167.. -> 165..);
- nine times button 7: "scroll HorScrollBar 0 -> 3 ... 26", the horizontal
bar moved and stopped at its end without the previous warning or hang;
- buttons 4/5 kept working after the horizontal scroll (before the deferral
the client froze after the first horizontal bar change).
Known limit: XmText's horizontal view does not follow the scrolled window's
horizontal bar (Motif has no public horizontal text scroll); vertical text
and horizontal panes with a real scrollbar work. MCDE_WHEEL_DEBUG=1 prints
the widget, the bars and the values.
The official make mcde-linux and the install into /usr/mdt follow when the
build lock is free; the same configured tree was used for the isolated build.
CDE 2.5.3's max_buf (lib/DtSvc/DtUtil1/Dts.c) called realloc(buf, mb_size)
with the OLD size and only then stored the new one, so the buffer stayed at
MB_SIZE (100) bytes and DtDtsDataToDataType's strncpy and terminator wrote past
it. dtwm aborted at start with 'malloc(): unsorted double linked list
corrupted' while the front panel read the data types.
Measured: valgrind on dtwm under Xvfb gave 'Invalid write of size 1, 0 bytes
after a block of size 100' (Dts.c:1321, block from max_buf Dts.c:303) and six
invalid-access contexts in all; after the change none, and dtwm runs 40 s under
valgrind and 8 s plain (before: status 134). The two remaining reports are
struct and X-protocol padding.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
LICENSE at the root; the 103 files new in ext/src/mcde (none was in the CDE
import) carry the CNCL line instead of the LGPL notice.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A new view beside icons, small icons and the columns (Command+4): the chosen
picture large in the middle, three neighbours each side, flat, in Motif's
frame colours -- no perspective, no reflection, no glide; a redraw happens on
Expose and when the choice changes. Under the strip the name is bold and
the kind follows (the type's label), then a scroll bar for the strip, then
the folder's list; the chosen line is selected and moves with the strip.
Pictures come from McdeThumb: only the visible entries are read, and the
second visit of a folder reads ~/.dt/thumbs (MCDE_THUMB_DEBUG=1 makes the
cache line appear; tools/mcde-shot.sh passes the variable into the session).
A file that is no picture is named where its neighbours are.
The arrows walk the strip (the list follows), Space is the file window's
preview, and the toolbar has the fifth toggle "Strip" -- its icon is the
folder's. Command+4 was the small-icon view; that moved to Command+5
(docs/reference/shortcuts.txt), as the strip takes the fourth place of the
reference's four views.
Measured under Xvfb with xdotool, a folder of 13 PNGs:
- Command+4 shows Bild-01 large with its neighbours
(docs/screenshots/leopard/finder-cover-flow-mcde.png shows Bild-03
chosen: two left, three right, "Bild-03.png" bold over "PNG", the list
with Bild-03 selected);
- Right twice walks to Bild-03 and the list's third line is selected;
- switching to Icons and back to Strip serves three of the visible
pictures from the cache: "thumb: .../Bild-02.png from the cache" and its
neighbours in the log (MCDE_THUMB_DEBUG=1);
- the strip's own drawing area takes the arrows and Space.
Open: the strip has its own list, not CDE's work-area list below it (the
status line and the other views' selection are not shared), and the split is
fixed -- no sash to drag. Idle traffic was not measured separately; the
strip draws only on Expose and on a change, and McdeThumb reads no timer.
PNG, JPEG, GIF, BMP and XPM are read with libpng, libjpeg and C99 -- GIF's
LZW, BMP's rows and XPM's text are the module's own, so no library beyond
what Motif already brings. A picture is scaled down with a box filter and
kept in $HOME/.dt/thumbs/<64|128|256>/<sha1 of real path, mtime and
size>.ppm; a cache over 50 MB is pruned by age when it is written to. A
picture larger than 8192 x 8192 or 64 MB is refused from its header before
a byte of pixel data is read, and a JPEG is decoded at 1/2, 1/4 or 1/8 when
that still has the size the caller asks for. McdeThumbRequest reads one
picture per Xt work proc, so a folder of photographs does not stop the
window, and McdeThumbRead/Scale is the part without X (a test needs no
display).
Measured on the build host, "make mcde-linux MCDE_DIRS='check lib/DtSvc'":
test_thumb PASS -- every format read back to its own pixels, the box
filter's means and aspect, the 8192/64 MB limits, a damaged file, and the
cache proved by its key (the source overwritten with rubbish of the same
size and mtime, the picture still returned from the PPM). 100 800 x 600
JPEGs at 64 px: 1.2 ms per decode, 100 cache files, 0.0 ms per picture
from the cache; an 11 MB 5000 x 3200 JPEG: 110 ms at 64 px.
include/Mcde/Displays.h (McdeDisp*): the arrangement arithmetic
(DtUtil2/McdeDispConf.c, test_displays now in lib/DtSvc) and reading,
setting and keeping the monitors through RandR (DtUtil2/McdeDisplays.c,
the RandR ids in the structure instead of tables of the pane). libDtSvc
links Xrandr when configure found it; dtwm links it for the coming plug
and play. Tested: make check in lib/DtSvc (test_displays) and
dtsystemsettings; the pane on the dummy Xorg as before (applied, back
after 16 s, kept and written).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Motif refuses accelerators of an unmanaged menu bar (RCPopup.c,
AllWidgetsAccessible), and the global menu unmanages the program's bar:
no menu shortcut worked while dtbar ran. Our Motif gets
_XmMenuBarSetExported; McdeGlobalMenu.c marks the bars it hides. A
preferences/options/settings item without a shortcut gets Command+comma.
Tested on Xvfb with dtbar: dtpad Command+F opens Find/Change, dtterm
Command+comma opens Global Options.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The front panel starts a kept program again with its command; CDE's
programs did not say it: dtterm's windows had neither WM_COMMAND nor
_NET_WM_PID, so the panel fell back to the class name. libDtSvc's new
McdeWmHints.c sets _NET_WM_PID (EWMH) on every top-level shell when it is
first mapped, and WM_COMMAND (ICCCM 5.1.1.1) from the application shell's
XtNargv where Xt has not set it; shells made later are found through Xt's
create hook. It runs from _DtMcdeGlobalMenuInitialize, which DtInitialize
calls and dtterm calls by itself (dtterm does not call DtInitialize), and
before that function's MCDE_NO_GLOBAL_MENU check.
Measured on Xvfb: dtterm -geometry 40x5 now has _NET_WM_PID and
WM_COMMAND { dtterm, -geometry, 40x5 }; dtcalc has _NET_WM_PID and
WM_COMMAND { dtcalc }.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Motif 2.3.8 shifts the channels of a PNG without alpha the wrong way and
draws only its blue (docs/reference/motif-png.txt). libDtSvc gets
McdeImageGetPixmap/McdeImageFreePixmap (Mcde/Image.h): PNG through libpng's
simplified interface (png_image, the background for the alpha), packed by
the visual's masks; every other format still through XmGetPixmap. dtwm's
backdrops and slideshow and the small pictures of System Settings use it.
dtwm now also frees a backdrop pixmap that is not in Motif's cache (a
scaled copy), which it kept for good before.
configure finds libpng >= 1.6 with pkg-config; the recipe includes
graphics/png's buildlink3.mk (Motif depends on it already); the header is
in the PLIST.
Measured on Xvfb: the RGB PNG that showed only blue (slide-3.png before)
shows its colours as backdrop (build/mcde-shots/slide-3.png) and as a
small picture (desk-2.png). A 16-bit PNG is not measured.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dtterm does not call DtInitialize: it starts the program side itself
(_DtMcdeGlobalMenuInitialize, declared in Mcde/GlobalMenu.h when Xt is in).
McdeGlobalMenu.c keeps all menu bars (dtterm has one per tab), hides any the
program manages while the bar runs (Xt change hook) and exports the first
that lives. dtterm's menus follow the tab with the focus
(_DtTermViewMenuSetCurrent, setContext split into contextFor), since from the
bar they are not posted from the tab. dtbar defers a new menu text while one
of its menus is open (the open menu was pulled away under the click).
Tested on Xvfb: dtterm's Window/Edit/Options/Help in the bar, no menu bar in
the window with two tabs, Window > New Tab from the bar makes the third.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
include/Mcde/GlobalMenu.h is the protocol (selection _MCDE_BAR_S<n>,
_MCDE_MENU on the program's window, _MCDE_ACTIVE_MENU on the root, client
messages to activate and refresh). libDtSvc's McdeGlobalMenu.c, started by
DtInitialize, finds every XmMenuBar with an Xt create hook, hides it while
the bar runs and writes its tree; a click in the bar calls the button's own
callback -- no Motif patch, every CDE program takes part. The text form is
McdeMenuModel.c with its test (PASS test_menumodel). dtbar: M menu (dtaction
Dtstyle, Dtterm, Dtfile, LockDisplay, ExitSession), the program's menus, the
clock; started by Xsession.d/0090.dtbar. The Mcde headers are installed.
Tested on Xvfb with dtwm and dtcalc: its menu bar leaves its window, Options
and Help are in the bar, Options > Memory Registers opens dtcalc's dialog.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cde-2.5.3.tar.gz, SHA512 a01b413b... as in pkgsrc distinfo; recipe from
pkgsrc 3c1118e94432. Added with -f: CDE's .gitignore hides 612 files of
the archive.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>