• src/conio/win32gdi.c

    From Deucе@1:103/705 to Git commit to main/sbbs/master on Thu Mar 19 14:38:35 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/e3a6c390aae2eeb7a6ce5c2f
    Modified Files:
    src/conio/win32gdi.c
    Log Message:
    Sync modifier key state on focus regain in Win32 GDI (ticket 226)

    After Ctrl+clicking a URL, the window loses focus before the Ctrl
    key-up event arrives, leaving the internal modifier state stuck.
    Poll GetKeyState() on WM_ACTIVATEAPP to reset mods to match reality.

    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sat Mar 21 20:46:07 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/95dbfeb369f2c4de0f7561e3
    Modified Files:
    src/conio/win32gdi.c
    Log Message:
    Use GetAsyncKeyState for modifier sync on focus regain (ticket 226)

    GetKeyState returns message-queue-synchronized state, which is stale
    when the key-up event was delivered to another window. Switch to GetAsyncKeyState which reads the actual hardware key state, so Ctrl
    and Shift are correctly cleared when the user released them while
    the browser (or other app) had focus.

    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sat Mar 21 23:25:27 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/cb106dbe65584cdf688429e1
    Modified Files:
    src/conio/win32gdi.c
    Log Message:
    Fix stuck modifier keys by handling WM_KILLFOCUS/WM_SETFOCUS in gdi_WndProc (ticket 226)

    WM_KILLFOCUS and WM_SETFOCUS are sent (synchronous), not posted, so
    they go directly to gdi_WndProc bypassing the GetMessage/magic_message
    path entirely. The previous fix in magic_message never ran.

    Move mods to file scope so gdi_WndProc can access it. Clear mods on WM_KILLFOCUS, and re-sync from GetAsyncKeyState on WM_SETFOCUS to
    catch modifiers held across the focus boundary. Remove the
    WM_ACTIVATEAPP handler and message-loop sync machinery which were
    unnecessary — debug logging confirmed the thread keyboard state (GetKeyboardState) correctly showed Ctrl as released; only the mods
    variable was stale, causing magic_message to consume key events as
    Ctrl+key combos via the keyval table.

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