BBS:      TELESC.NET.BR
Assunto:  src/conio/win32gdi.c
De:       Deuc¨
Data:     Sat, 21 Mar 2026 23:25:27 -0700
-----------------------------------------------------------
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) 
n
---
  mSynchronetn  hgVertrauen n hHome of Synchronet n gh[vert/cvs/bbs].synchro.net

-----------------------------------------------------------
[Voltar]