mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Windows: Perform keyboard layout switching whenever window focus is gained or lost.
git-svn-id: https://svn.eduke32.com/eduke32@5972 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
fefd94d8ef
commit
0b75ca3ec1
3 changed files with 6 additions and 0 deletions
|
@ -2293,6 +2293,8 @@ int32_t handleevents_pollsdl(void)
|
||||||
if (mousegrab && moustat)
|
if (mousegrab && moustat)
|
||||||
grabmouse_low(appactive);
|
grabmouse_low(appactive);
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
Win_SetKeyboardLayoutUS(appactive);
|
||||||
|
|
||||||
if (backgroundidle)
|
if (backgroundidle)
|
||||||
SetPriorityClass(GetCurrentProcess(), appactive ? NORMAL_PRIORITY_CLASS : IDLE_PRIORITY_CLASS);
|
SetPriorityClass(GetCurrentProcess(), appactive ? NORMAL_PRIORITY_CLASS : IDLE_PRIORITY_CLASS);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -570,6 +570,8 @@ int32_t handleevents_pollsdl(void)
|
||||||
if (mousegrab && moustat)
|
if (mousegrab && moustat)
|
||||||
grabmouse_low(!!appactive);
|
grabmouse_low(!!appactive);
|
||||||
# ifdef _WIN32
|
# ifdef _WIN32
|
||||||
|
Win_SetKeyboardLayoutUS(appactive);
|
||||||
|
|
||||||
if (backgroundidle)
|
if (backgroundidle)
|
||||||
SetPriorityClass(GetCurrentProcess(),
|
SetPriorityClass(GetCurrentProcess(),
|
||||||
appactive ? NORMAL_PRIORITY_CLASS : IDLE_PRIORITY_CLASS);
|
appactive ? NORMAL_PRIORITY_CLASS : IDLE_PRIORITY_CLASS);
|
||||||
|
|
|
@ -3541,6 +3541,8 @@ static LRESULT CALLBACK WndProcCallback(HWND hWnd, UINT uMsg, WPARAM wParam, LPA
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Win_SetKeyboardLayoutUS(appactive);
|
||||||
|
|
||||||
if (backgroundidle)
|
if (backgroundidle)
|
||||||
SetPriorityClass(GetCurrentProcess(),
|
SetPriorityClass(GetCurrentProcess(),
|
||||||
appactive ? NORMAL_PRIORITY_CLASS : IDLE_PRIORITY_CLASS);
|
appactive ? NORMAL_PRIORITY_CLASS : IDLE_PRIORITY_CLASS);
|
||||||
|
|
Loading…
Reference in a new issue