mirror of
https://github.com/SFML/SFML.git
synced 2024-11-29 06:41:05 +08:00
Pressing ALT or F10 on Windows no longer steals the focus
This commit is contained in:
parent
7554c86f7d
commit
96d0204f30
@ -899,6 +899,10 @@ LRESULT CALLBACK WindowImplWin32::globalOnEvent(HWND handle, UINT message, WPARA
|
||||
if (message == WM_CLOSE)
|
||||
return 0;
|
||||
|
||||
// Don't forward the menu system command, so that pressing ALT or F10 doesn't steal the focus
|
||||
if ((message == WM_SYSCOMMAND) && (wParam == SC_KEYMENU))
|
||||
return 0;
|
||||
|
||||
static const bool hasUnicode = hasUnicodeSupport();
|
||||
return hasUnicode ? DefWindowProcW(handle, message, wParam, lParam) :
|
||||
DefWindowProcA(handle, message, wParam, lParam);
|
||||
|
Loading…
Reference in New Issue
Block a user