• src/conio/win32gdi.c

    From Deucе@VERT to Git commit to main/sbbs/master on Friday, December 05, 2025 22:41:13
    https://gitlab.synchro.net/main/sbbs/-/commit/16458f3b0ba13c98bbd18fa2
    Modified Files:
    src/conio/win32gdi.c
    Log Message:
    Add a dash of crazy to placate MSDN.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Friday, December 05, 2025 23:53:18
    https://gitlab.synchro.net/main/sbbs/-/commit/151af2c066100dff02f06712
    Modified Files:
    src/conio/win32gdi.c
    Log Message:
    Almost, just turns out that CreatePipe() is useless.

    So, ReadFile() will work the same if you don't specify an OVERLAPPED
    structure regardless of a handle being overlapped or not. However, CreatePipe() doesn't create it overlapped, so we need to create our
    own CreatePipe() thing that does open the read end for overlapped.

    Also, fix some bugs in the overlapped bits and now it appears to work.

    Enjoy the lowered CPU utilization.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Saturday, January 03, 2026 11:11:49
    https://gitlab.synchro.net/main/sbbs/-/commit/30e18fb3dc21780a29ade29d
    Modified Files:
    src/conio/win32gdi.c
    Log Message:
    Only adjust the bottom/left corner of the sizing rectangle

    Adjusting anything else can lead to weirdness due to the unreliable
    nature of window decoration sizes.

    Should bug fix ticket 215

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Thursday, March 19, 2026 14:38:35
    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>

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Saturday, March 21, 2026 20:46:07
    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>

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Saturday, March 21, 2026 23:25:27
    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>

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