• src/doors/termgfx/mouse.c

    From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Saturday, July 18, 2026 03:02:00
    https://gitlab.synchro.net/main/sbbs/-/commit/27322e835a80b39ac845f903
    Added Files:
    src/doors/termgfx/mouse.c mouse.h src/doors/termgfx/test/test_mouse.c Modified Files:
    src/doors/termgfx/CMakeLists.txt src/doors/termgfx/test/CMakeLists.txt Log Message:
    termgfx: add a shared SGR mouse handshake module

    Extract the terminal-protocol half of syncconquer's absolute-pixel mouse
    -- the DEC 1003/1006/1016 enable/restore strings, the SGR-Pixels latch
    (DECRQM reply + past-the-grid auto-detect) and the button-field classify
    -- into termgfx/mouse, so a second door (syncscumm) can share it instead
    of duplicating the handshake. Coordinate mapping stays door-side; only
    the protocol lives here, mirroring sgrmouse.h's split. Unit-tested.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Saturday, July 18, 2026 03:02:00
    https://gitlab.synchro.net/main/sbbs/-/commit/5ece4c8de5947e95b00c5af1
    Modified Files:
    src/doors/termgfx/mouse.c mouse.h src/doors/termgfx/test/test_mouse.c Log Message:
    termgfx: match mouse module comment style to the directory

    mouse.h and mouse.c were the only top-level files in termgfx still
    using /* ... */ block comments; every sibling (sgrmouse.h, sixel.h,
    term.h, keymode.h, ...) uses // line comments exclusively. Convert
    all of them, preserving wording; no code, identifiers, or escape
    string literals changed.

    Also strengthen test/test_mouse.c per review:
    - add a Ps=3 ("permanently set") DECRPM case, since mouse.c's latch
    condition is (params[1] == 1 || params[1] == 3) but only Ps=1 was
    covered
    - actually call termgfx_mouse_note_pixel_report() twice and assert
    the latch is still 1, since the comment claimed idempotency but
    the test only called it once

    Removed the unused <stddef.h> include from mouse.c (no NULL/size_t
    use in the file).

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net