• src/doors/termgfx/termgfx_termio.c termgfx_termio.h

    From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Thu Jul 23 23:03:46 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/136378ac726525e7c07f188c
    Modified Files:
    src/doors/termgfx/termgfx_termio.c termgfx_termio.h
    Log Message:
    termgfx: stats field, idle-on-top, CSI-S F4, clear-on-resize, mouse opt-out

    Shared-layer changes, all additive APIs or internal fixes:

    - termgfx_termio_set_stats_extra(): an optional door-owned token appended
    to the Ctrl-S strip (syncrpg shows the game resolution). The strip is
    byte-for-byte unchanged for doors that never set it.

    - Draw the idle-disconnect countdown AFTER the frame image. It is split
    out of termgfx_stats_draw() into termgfx_idle_draw(), called past the
    image emit in both present paths and from the static-scene paints. The
    JXL tier reserves no bottom row, so a height-constrained (e.g. 320x240)
    game would otherwise hide the disconnect warning behind the picture.
    The debug stats bar stays before the image and is suppressed while the
    countdown owns the row.

    - Decode F4 from CSI-S. Kitty and legacy keep F1/F2/F4 on the P/Q/S
    finals, so F4 arrives as "CSI 1;<mods>S", which collided with the
    XTSMGRAPHICS reply and was silently dropped -- Foot's F4 did nothing.
    The reply's required '?' marker disambiguates them; with no marker,
    dispatch F4. F3's 'R' stays ambiguous with CPR and is left to CSI 13~
    or evdev.

    - Erase the display on an image-rect change in the truecolor present
    path. A frame that shrinks (a door cycling to a smaller resolution)
    otherwise leaves the taller previous frame's bottom rows on screen.
    One 2J per change, guarded, so there is no per-frame flicker.

    - termgfx_termio_set_mouse(0): a keyboard-only door opt-out. It sends the
    mouse DISABLE rather than enable, so motion tracking (mode 1003) no
    longer streams hover reports that reset the idle clock (motion counts
    as activity) for a door that never reads the mouse. Stray reports are
    dropped outright as a backstop.

    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)