- code_window_tests.sh and debugger_tests.sh launch a spin binary
(loops forever for the step debugger) and never killed it; two
spins were left at ~100% CPU each, 80+ minutes after their tests
finished.
- kill_spin() (path-scoped to the test's own WORK/spin, via
/proc/<pid>/exe, so an unrelated spin is never touched) kills the
spin, waits for its gdb parent to exit, and kills the gdb if it
lingers. Wired into kill_app() and the EXIT trap, plus a pre-test
cleanup that kills stale spins from aborted runs.
- Verified: code_window_tests.sh run twice, ALL PASS both times, no
spin/gdb/lightgui/Xvfb left afterwards; the 41-minute stale spin
from the earlier run was cleaned up by the pre-test cleanup.
- debugger_tests.sh ALL PASS, no spin/gdb left.
- XFrame placement: layout raises+activates itself via EWMH
(_NET_ACTIVE_WINDOW + XRaiseWindow + XSetInputFocus) on every new
palette selection, and the designer forwards a canvas click to the
layout via a place-request file (/tmp/lightgui-place.txt,
$LIGHTGUI_PLACE) when an XFrame widget is selected, so placement
works even when the click lands on the designer canvas. Verified
under openbox (real WM): selection raises the layout, place file
centres the widget on the click.
- Resize handles: 16px drawn (was 12px), 32x32 grab target (8px hit
pad around each handle centre). All 8 handles verified by real
mouse drags under openbox: SE corner resizes both axes exactly,
N edge height-only, W edge width-only; handles drawn last
(foreground) so they are always on top.
- Help -> About: GtkAboutDialog with the git commit hash baked in
at build time (Makefile -DLIGHTGUI_GIT_HASH) and the build date.
- Menu bar moved out of the main designer window into the LightGUI
Code window (reparented from root_box at startup); the layout
window is now just the layout manager. Ctrl+E on the main window
toggles the Code window back in when it is hidden.
- Tabbed multi-file editor in the Code window: GtkNotebook, one
codeview per tab, File -> Open File in Code... opens a file in a
new tab, per-tab dirty flag / Ctrl+S save / close button (asks
before dropping unsaved edits), Variables pane + splitter and
//region folding kept per tab. Debugger opens the stopped file in
its own tab instead of overwriting the current one; refresh shows
generated code in its own tab and never clobbers a hand-opened file.
- tests/code_window_tests.sh: reopen check now uses Ctrl+E.
- palette_window/palette_icons tests: newer ImageMagick prints
1526 (0.0138727) for compare -metric AE, so the integer -gt test
failed on a passing diff; strip to the bare count. Palette window
suite now 16/16.
- code_window test: View -> Code View reopen used F10 menu navigation
(does not fire under bare Xvfb here) and fallback clicks at (130,12)
that hit Debug, not View (View spans x 80-128); click the measured
positions instead (108,12 then 162,37). Suite now ALL PASS.
- chart_pro render test: the resize-allocation check raced the Xvfb
configure event (same binary passed 1/3 runs); wait boundedly for
the allocation to shrink instead of a single pump().
- IndVortex: off-by-one in ind_vortex() aborted the layout on place
(series[k-1] with k=0 when i=period-1); guard is now i < period.
Pre-existing in the CWidgets source, fixed here in lightgui only.
Placement test now 547/547 place, 547/547 draw, 0 failures.
Regenerated screenshots + palette_layout_results.csv from the passing
runs.
- open_code_view() now parks the code window on first creation: right
of the palette window when visible (2560x1440: design 0..1150, palette
1162..1412, code 1424..2424), else right of / below the design window,
else a small cascade offset. Previously it opened at 0,0 exactly over
the design window, hiding the canvas and menu bar, so palette clicks
and the View menu could not reach the designer (palette-places-widgets
and palette-reopens-from-view-menu failed on the merged tree).
- Startup order: palette window opens before the code window so the
parking geometry can read the palette position.
- tests/code_window_tests.sh: wait for any previous :99 server (the
self-test xvfb-run -a instance) to go quiet before starting our own
Xvfb, wait for the display to answer, and verify our Xvfb survived
startup; fixes the flaky cannot-open-display failure.
- The code view is now its own top-level window (FDesigner — Code),
opened together with the designer at startup; View -> Code View
toggles it. Closing hides it (app keeps running); reopening
restores it with fresh content.
- Automatic variable inspection pane at the bottom of the code
window: on every debugger stop it shows the current scope
(function — file:line (reason)) and the frame locals
(name/type/value) from the SAME shared GdbSession (200 ms poll
in main; no second gdb). While running it shows a running state
and never presents stale values; on exit it shows the exit code.
On stop the stopped file is loaded into the code view if needed
and any fold hiding the paused line is unfolded.
- Paused line: solid red (#c00000) full-line background with white
text, plus a white gutter arrow — Lazarus-style execution-point
marking (ahaExecutionPoint: full-line background + gutter arrow,
distinct from the red-dot breakpoint marker), adapted to the
user-requested red. The paused tag outranks the current-line tag
and syntax tags; it clears on resume and moves on step.
- Debugger window: F5 Continue / F10 Step Over / F11 Step Into
shortcuts (tooltips already promised them); new accessors for the
code-window poll (poll_events, session_state, stop_seq,
last_stop, locals, refresh_on_stop) and a debugger_autorun test
hook; GdbSession gains a stop_seq() accessor.
- Tests: tests/code_window_tests.sh drives the real app under Xvfb
(separate window, stop + locals in two scopes, red-band pixels,
step moves the band, resume clears it, running state, gutter
click stages/removes a breakpoint in the backend, close/reopen)
plus self-test checks for the paused tag colours/priority and the
inspection API. FDESIGNER_DEBUG_TARGET/BREAK and
FDESIGNER_CODEWIN_DUMP hooks support it.