Commit Graph
23 Commits
Author SHA1 Message Date
lotherkandClaude Opus 5.5 c0bf505c0a mcde: keyboard and mouse in System Settings; dtsession keeps them
dtsystemsettings draws the Keyboard pane (key repeat, its delay and rate,
key click, a field to try it) and the Mouse pane (primary button, pointer
speed, threshold, double-click time) instead of opening dtstyle.  A change
takes effect at once through Xlib and goes to dtsession as dtstyle sends
it (_DT_SM_KEYBOARD_INFO, _DT_SM_POINTER_INFO; *multiClickTime through
_DtAddToResource).

dtsession saves and restores the XKB repeat delay and interval
(XkbGetAutoRepeatRate at logout, XkbSetAutoRepeatRate at login), which the
core keyboard state does not carry.  And it keeps every pointer button: the
map was char[5], the parse of the property wrote past it without a bound,
and the restore cut the map to 5, which the server refuses on a mouse with
more buttons.

Measured on Xvfb (build/mcde-shots): the sliders set the server (xset q:
delay 490, rate 29, click 20; acceleration 3/1, multiClickTime 280; xmodmap
-pp 1->3, 3->1).  Through a whole dtsession: logout wrote RepeatDelay 490,
RepeatInterval 34, ButtonMap 3,2,1,4,...,10 (10 buttons), AccelNum 3; the
next login restored delay 490 rate 29, acceleration 3/1 and the swapped
buttons.  The double-click time is saved (dt.resources) but its restore is
not measured: a dtsession started without Xsession gets no resources
loaded (3 in xrdb, against 108 in a real session).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 07:30:58 +00:00
lotherkandClaude Opus 5.5 451aac7fe4 mcde: the battery in the bar
McdeSys gets mcde_sys_battery: all batteries as one, charging, mains,
minutes left.  NetBSD reads the envsys(4) dictionary of /dev/sysmon as
envstat(8) does (acpibat "present", "charge", "charging", "discharge
rate"; acpiacad "connected"), Linux /sys/class/power_supply (energy_* or
charge_*, status, Mains/USB online).  The sources are in
docs/reference/battery.txt.

dtbar shows a fourth icon, only when there is a battery: full, half, low
(red), charging; its menu says the charge, the power source and the time
left.  The status bar is 30 pixels an icon.

Measured: on the Linux host test_sysinfo says "battery 76% ac", as
/sys/class/power_supply/BAT0/capacity and AC/online do; the menu on Xvfb
(build/mcde-shots/battery-menu.png) says "Battery: 76 %", "Power Source:
Power Adapter".  The NetBSD backend compiles and runs in the build VM,
which has no battery (envstat: no drivers registered): only the
no-battery case is measured there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 07:01:18 +00:00
lotherkandClaude Opus 5.5 3969c15907 mcde: dtterm: closing a split pane leaves the window its size
The paned window gave the closed pane's height back to the shell and the
window shrank.  The neighbour above (else below) is held at both heights
until the paned window has laid it out, as a split holds the new pane
(SplitDone).  Measured on Xvfb: build/mcde-shots/split-1.png, split-2.png.

www: split and drop-down are done, the search field of dtfile too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 22:18:09 +00:00
lotherkandClaude Opus 5.5 92f1d6a762 mcde: dtfile: search field, view buttons right at start, places and Back/Forward fixed
- A search field in the toolbar narrows the window to the names with the
  text (any case); FilterFiles asks _McdeNavHidden, the text is kept per
  window in Navigation.c; a new directory starts with an empty search.
- The view buttons show the window's view from the start, and the first
  directory starts the history: the first window gets it without
  ShowNewDirectory, so both are set once the window's data is attached.
- ChangeDir.c: the desktop folder's lock compared two empty ToolTalk paths
  and refused every folder ('restricted folder' with an empty name); it
  compares real paths only.
Tested on Xvfb with dtwm: Icons pressed at start, List, Documents from the
sidebar, Back to home, Forward to Documents, 're' leaves report.pdf.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 18:17:13 +00:00
lotherkandClaude Opus 5.5 f28826c4f2 mcde: dtterm splits a tab: Ctrl+Shift+D, one more terminal below
Every tab is a page now, an XmPanedWindow (mcdeSplit) holding the tab's
DtTermViews -- Xt cannot give a widget another parent, so the page is there
from the start and a split is one more view in it (_McdeTabsPageFor).  The
new view is held at its share of the page's height until the paned window
has laid it out, then gets the keyboard; a pane keeps at least 60 pixels.
Ctrl+Shift+W closes the view, the tab with its last, the window with its
last tab.  Tested on Xvfb: two terminals in one tab, typing goes to the new
one, closing it keeps dtterm running, Ctrl+Shift+T still opens a tab.
Open: after closing a pane the window shrinks to the one left.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 18:08:03 +00:00
lotherkandClaude Opus 5.5 928c77506c mcde: dtterm -dropdown, the terminal that comes down from the top on F12
Dropdown.c: full width, 40 % of the screen high, override-redirect, hidden
until its key (resource dropdownKey, F12); then it slides down in 8 steps to
below the top bar and takes the keyboard, the key sends it back up.  The key
is grabbed on the root window (with the CapsLock/NumLock combinations, a
BadAccess is reported) and taken in dtterm's own event dispatcher
(XtSetEventDispatcher): registering the root window with a widget did not
bring it.  Xsession.d/0085.dtdropdown starts it in every session.
Tested on Xvfb with dtwm and dtbar: hidden at start, down on F12 below the
bar with the keyboard (typed 'echo dropped down'), up again on F12.
xdotool key F12 maps F12 to a spare keycode the grab never sees; the test
sends an XTest event on F12's own keycode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 18:03:39 +00:00
lotherkandClaude Opus 5.5 0c7451b46d mcde: dtbar's M is the Makronix logo, drawn for 16 pixels
MakronixDtlogo.t.pm: the M with its star, drawn by hand -- the 240-pixel logo
scaled to 16 was a dark square.  dtbar gives it when the button is made (so
Motif sizes it) and keeps the letter M where the icon is missing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 17:56:32 +00:00
lotherkandClaude Opus 5.5 8ab668c689 mcde: Accounts and Software Update, in dtsystemsettings and McdeSys
McdeSys: mcde_sys_users/user_add/user_delete (users.c, POSIX getpwent and
useradd/userdel), user_set_password and user_set_admin per system (NetBSD:
pw_gensalt+crypt for usermod -p, wheel; a group member removed by rewriting
the group's line as user.c does, since usermod -G only appends -- measured;
Linux: chpasswd on stdin, gpasswd, sudo), mcde_sys_update_check/apply
(NetBSD: /etc/makronix/update, RELEASE, sysupgrade, pkg_add -uu; Linux:
apt-get).  A secret goes through a pipe, never on a command line.
Tests: test_sysinfo refuses a bad login and, not as root, adding (PASS on
Linux and NetBSD); as root in the NetBSD VM add/admin on/off/password/delete
pass and /etc/group is as before.

dtsystemsettings: Accounts (list, Add/Delete/Password/Administrator,
Unlock... through su -m root in a terminal, password fields show stars),
Software Update (running, available, new packages, source, Check Now,
Update Now... runs -apply-update as root in a terminal; the check runs
after the pane shows: apt took 21 s here).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 12:38:21 +00:00
lotherkandClaude Opus 5.5 6f68d92f75 mcde: dtsystemsettings, the settings of the computer in one window
Four bands of icons -- Personal, Hardware, Internet & Network, System --
from panes.c (plain C, PASS test_panes); a click opens the pane in the
window, Show All goes back, -pane ID opens one directly.  Own panes through
McdeSys: Sound (volume, mute), Network (the cards, addresses, SSID),
Bluetooth (state, on/off), Date & Time (a running clock, the zone), About
(everything mcde_sys_info knows).  Appearance, Desktop, Fonts, Language,
Screen Saver, Keyboard, Mouse, Startup open dtstyle, Printers dtprintinfo,
until they are drawn here; Accounts and Software Update are greyed.  dtbar's
System Settings... and the Sound/Bluetooth/Network Settings... items open
it.  New icons: a 48-pixel Makronix logo, 32-pixel network and Bluetooth.
Seen on Xvfb with dtwm and dtbar, sound against a private PulseAudio.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 12:24:42 +00:00
lotherkandClaude Opus 5.5 776e0f3d47 mcde: dtbar status menus work: slider in the menu, icons as CDE icon files
- menuscale.c gives XmScale Motif's XmQTmenuSavvy trait (XmeTraitSet, as
  Label.c does for its classes): a menu takes the volume slider without
  "wrong child type".  Dragged against a private PulseAudio (null sink):
  40 % -> 100 %, two wheel steps -> 90 %.
- The icons are CDE icon files (icons/Mcde*.t.pm, appconfig/icons/C, in the
  PLIST), loaded with XmGetPixmap; the status menu bar has a fixed width (the
  form had squeezed the buttons to 10 pixels).
- McdeSys sets SIGCHLD to the default while it waits for a tool: dtbar
  ignored SIGCHLD, waitpid gave no status and every query failed (volume -1).
  dtbar starts programs with a double fork instead.
- Menu entries left-aligned; Mute shows its box when off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 11:23:50 +00:00
lotherkandClaude Opus 5.5 e8b69e1cfd mcde: dtbar: volume, Bluetooth and network icons with their menus (work in progress)
status.c: three menus with 16x16 XPM icons left of the clock, through
McdeSys (volume via pactl/mixer, Bluetooth, interfaces); the wheel over the
speaker turns the volume.  Shown on Xvfb with dtbar alone (speaker, Bluetooth,
network, clock).  Open: with dtwm running the icons do not show
(build/mcde-shots/wcmp.png); the volume scale in a pulldown draws Motif's
'wrong child type' warning (RowColumn.c checks the XmQTmenuSavvy trait) --
next step a scale subclass with that trait; the network icon shows wired
while the host is on Wi-Fi.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 08:23:59 +00:00
lotherkandClaude Opus 5.5 2c7ca200b0 mcde: dtbar's M menu: About This Computer, Favourites, Recent Items, Force Quit, power
The M menu has About This Computer (logo, system and version, processor,
memory, startup disk, More Info with machine, kernel, host name, disk space
and the desktop's version, all from mcde_sys_info), Software Update (greyed
until the update exists), System Settings, Favourites (~/.dt/favourites, with
Edit Favourites...) and Recent Items (~/.dt/recent, written when an item is
opened, with Clear Menu) -- items.c with its test (PASS test_items) --, Force
Quit (the programs with a window, XKillClient), Sleep, Restart..., Shut
Down... (McdeSys, the last two ask first), Lock Screen and Log Out <name>.
The bar's dialogs are centred on the screen (Motif centred them on the bar).
Tested on Xvfb: About, a favourite started and listed under Recent Items,
Force Quit ended dtcalc, the Shut Down question shows (not confirmed: on the
development host it could shut the computer down).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 08:03:48 +00:00
lotherkandClaude Opus 5.5 7757e1b19f mcde: dtterm's menus in dtbar; every menu bar of a window hidden; no rebuild of an open menu
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>
2026-11-10 07:43:50 +00:00
lotherkandClaude Opus 5.5 38674be8b2 mcde: dtwm places and maximizes windows below dtbar
McdeExcludeBar (WmMultiHead.c) takes the bar's height off the area at the top
of the screen while dtbar owns _MCDE_BAR_S<screen>; used for the placement
area and for maximizing, not for full screen.  Tested on Xvfb: dtcalc placed
at frame y=23 (the bar is 23 high), maximized to 1012x648 below the bar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 07:31:12 +00:00
lotherkandClaude Opus 5.5 e8240130d8 mcde: dtbar, the bar at the top with the menus of the active program
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>
2026-11-10 07:27:29 +00:00
lotherkandClaude Opus 5.5 261cb1e992 mcde: dtterm profiles (font, colours, command); Window > New Tab with Profile
Profiles.c reads ~/.dt/dtterm.profiles (else the config/ one), plain C with
its test (make check: PASS test_profiles).  A view with a profile is named
profile_<name>; its colours are resources of that name, its font an Xft
render table that TermView now passes on to the terminal, its command
DtNsubprocessArgv unless -e gave one.  Ctrl+Shift+T keeps the profile of
the tab; the Window menu gets New Tab and New Tab with Profile through a
hook in TermViewMenu.c; dtterm -profile NAME, and "Default" to start with.
Tested on Xvfb with dtwm: -profile, a tab by key, a tab by the menu.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 07:08:16 +00:00
lotherkandClaude Opus 5.5 b14aea8543 mcde: dtterm tabs (Ctrl+Shift+T/W/Left/Right), titles per tab
programs/dtterm/Tabs.c: the window holds an XmTabStack, every tab a whole
DtTermView (its own process, menu, scroll bar); a tab whose shell exits
closes alone, the window with its last tab; the keyboard follows the tab
in front.  DtTermMain.c: views go into the container, the window's menu
toggle and close callback belong to the first tab, NewTab for Ctrl+Shift+T,
ShellOf where the code took the view's parent for the shell (session
save, clone).  TermParse.c: a title set by a program goes to its tab, and
to the window only from the tab in front.
Found on the way: XmTabStack has a child of its own (the bar of tabs);
counting it as a tab crashed Ctrl+Shift+Left and kept the first tab from
registering the close callback.
Tested on Xvfb with dtwm and xdotool (build/mcde-shots/tabs-*.png): two
tabs, titles 'second' / 'first' on switching, one closed, dtterm running.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 00:03:16 +00:00
lotherkandClaude Opus 5.5 ac0952a29b mcde: anti-aliased Hack everywhere; dtterm draws through Xft with UTF-8 and glyph fallback
Fonts:
- fonts/hack: Hack 3.003 (Expat + Bitstream Vera, from Debian fonts-hack),
  installed to dt/fonts; config/fonts.conf (the system's fontconfig plus
  that directory) exported by Xsession.d/0070.dtfonts and
  Dtlogin*environment.
- sys.resources and dtlogin Xresources: Xft render tables in Hack 10 for
  renderTable, textRenderTable, labelRenderTable, buttonRenderTable (a
  render table wins over sys.font's *FontList; dtterm and text fields read
  the text table).
dtterm (ported from MakroDE -- setlocale and the Xft renderer -- then fixed):
- configure: Xft on by default, --disable-xft for machines without it.
- TermPrimRenderXft.c: reads wchar_t in multibyte locales (it read the
  buffer as UTF-8 bytes: three boxes after every character), places every
  character in its cell on the baseline, fills the background, draws
  underline/overstrike/secure, wcwidth for wide and combining characters,
  borrows glyphs from fontconfig fallbacks (check mark, CJK), and makes its
  XftDraw at the first drawing (made in Initialize it was window 0, and the
  first string a BadDrawable that ended dtterm).
- TermPrim.c AdjustWindowUnits: the cell from the renderer's extents when
  there is no XFontStruct (crashed with Xft); _DtTermPrimRenderFontExtents.
- TermPrimRenderFont.c: with setlocale the buffer is wchar_t in UTF-8, the
  single-font renderer draws it as XChar2b (it drew boxes too).
Screenshots: build/mcde-shots/dtterm-utf8b-crop.png, dtterm-classic-crop.png.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 23:55:41 +00:00
lotherkandClaude Opus 5.5 07c3ce19f0 mcde: dtlaunch, the launcher: hot key, programs, snippets, clipboard history, calculator
programs/dtlaunch: Alt+space (Dtlaunch*hotkey) opens a field and a list;
matches programs in $PATH, ~/.dt/snippets (keyword TAB text), the
clipboard history (polled CLIPBOARD, 50 entries, memory only) and
calculations (=12*(3+4)).  Return starts the program or puts the text on
CLIPBOARD and PRIMARY.  One per display (_MCDE_DTLAUNCH); a second start
opens the first.  C99/POSIX + Xt/Motif, no warnings with -Wpedantic.
model.c (no X) with test_model.c: make check PASS.  Started in every
session by config/Xsession.d/0080.dtlaunch.  Tested on Xvfb: snippet and
result reach the clipboard (build/mcde-shots/dtlaunch-*.png).
tools/mcde-linux.sh: check mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 20:41:14 +00:00
lotherkandClaude Opus 5.5 94f116c272 mcde: builds on Linux (GCC 15); dtfile gets toolbar, sidebar, history, free space; make mcde-linux, mcde-shot
- configure.ac: the C dialect (-std=gnu11 and five GCC 14 downgrades) is
  configure's own, also handed to dtksh's ksh93 build (MCDE_DIALECT_CFLAGS).
- The pkgsrc placeholders folded in from wm/cde (@PREFIX@, @VARBASE@,
  @PKG_SYSCONFDIR@) are configure options now: --with-logfiles-dir,
  --with-config-dir, --with-local-bindir; and --with-pamdir (dtlogin,
  dtsession) and --with-calendar-dir (dtcm, rpc.cmsd) replace paths that
  were fixed.  Defaults unchanged; the recipe passes its paths.
- dtfile: programs/dtfile/Navigation.c -- Back/Forward with a history per
  window, views Icons/Small/List, places in a sidebar, free space in the
  status line (statvfs).  Screenshot: build/mcde-shots/dtfile-7.png.
- make mcde-linux (tools/mcde-linux.sh): the development build on this host,
  every system path under build/mcde-root.  tools/mcde-shot.sh: run a
  program on a private Xvfb with ttsession and dtwm, empty environment and
  its own HOME, take a screenshot.  tools/ext-sync.sh: ext recipes into
  pkgsrc/<cat>/<name>.

Measured: build/logs/mcde-linux-install3-2026-11-09.log (mcde-linux exit=0).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 20:32:32 +00:00
lotherkandClaude Opus 5.5 70c9cd27cb mcde: rename to MCDE 0.1.0, conflict with cde, Makronix logo in dtlogin, the C99/POSIX system layer as contract
- pkgsrc recipe: DISTNAME mcde-0.1.0 (archive from tools/mcde-dist.sh),
  CONFLICTS+= cde-[0-9]*, DESCR.
- configure.ac: AC_INIT name and version 0.1.0; MCDE_VERSION; the
  tarname and the CDE_VERSION_* API level stay (share/cde, DtVERSION).
- Dt.h: DtVERSION_STRING "MCDE 0.1.0 (CDE 2.5.3)".
- programs/icons/MakronixDtlogo.pm from docs/logo/camouflage, installed,
  in PLIST, the default Dtlogin*logo*bitmapFile.
- include/Mcde/McdeSys.h: users, network/Wi-Fi, host name, time zone;
  checked with gcc -std=c99 -D_POSIX_C_SOURCE=200809L -pedantic.
- ext/src/mcde/AGENTS.md: the philosophy (CDE/Motif/Xlib only, C99/POSIX,
  everything OS-specific behind lib/McdeSys, conflicts with CDE).

Not built yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 19:40:06 +00:00
lotherkandClaude Opus 5.5 7ea25c5d3e mcde: fold the nine pkgsrc patches of wm/cde into the tree
A fork carries its fixes in the source; the recipe no longer patches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 19:37:04 +00:00
lotherkandClaude Opus 5.5 3b2a54c64b ext/src/mcde: import CDE 2.5.3 and pkgsrc wm/cde unchanged (the base of the MCDE fork)
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>
2026-11-09 19:36:46 +00:00