mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:42:57 +00:00
[NTUSER] Fix UserSetDefaultInputLang by using reordering
- Move IntReorderKeyboardLayouts function. - Fix UserSetDefaultInputLang function. CORE-11700
This commit is contained in:
parent
f308c6a2bc
commit
b76602ff22
1 changed files with 21 additions and 21 deletions
|
@ -556,6 +556,26 @@ UserHklToKbl(HKL hKl)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Win: ReorderKeyboardLayouts
|
||||||
|
VOID FASTCALL
|
||||||
|
IntReorderKeyboardLayouts(
|
||||||
|
_Inout_ PWINSTATION_OBJECT pWinSta,
|
||||||
|
_Inout_ PKL pNewKL)
|
||||||
|
{
|
||||||
|
PKL pOldKL = gspklBaseLayout;
|
||||||
|
|
||||||
|
if ((pWinSta->Flags & WSS_NOIO) || pNewKL == pOldKL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
pNewKL->pklPrev->pklNext = pNewKL->pklNext;
|
||||||
|
pNewKL->pklNext->pklPrev = pNewKL->pklPrev;
|
||||||
|
pNewKL->pklNext = pOldKL;
|
||||||
|
pNewKL->pklPrev = pOldKL->pklPrev;
|
||||||
|
pOldKL->pklPrev->pklNext = pNewKL;
|
||||||
|
pOldKL->pklPrev = pNewKL;
|
||||||
|
gspklBaseLayout = pNewKL; /* Should we use UserAssignmentLock? */
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* UserSetDefaultInputLang
|
* UserSetDefaultInputLang
|
||||||
*
|
*
|
||||||
|
@ -571,7 +591,7 @@ UserSetDefaultInputLang(HKL hKl)
|
||||||
if (!pKl)
|
if (!pKl)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
gspklBaseLayout = pKl;
|
IntReorderKeyboardLayouts(IntGetProcessWindowStation(NULL), pKl);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -741,26 +761,6 @@ co_UserActivateKeyboardLayout(
|
||||||
return hOldKL;
|
return hOldKL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Win: ReorderKeyboardLayouts
|
|
||||||
VOID FASTCALL
|
|
||||||
IntReorderKeyboardLayouts(
|
|
||||||
_Inout_ PWINSTATION_OBJECT pWinSta,
|
|
||||||
_Inout_ PKL pNewKL)
|
|
||||||
{
|
|
||||||
PKL pOldKL = gspklBaseLayout;
|
|
||||||
|
|
||||||
if ((pWinSta->Flags & WSS_NOIO) || pNewKL == pOldKL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
pNewKL->pklPrev->pklNext = pNewKL->pklNext;
|
|
||||||
pNewKL->pklNext->pklPrev = pNewKL->pklPrev;
|
|
||||||
pNewKL->pklNext = pOldKL;
|
|
||||||
pNewKL->pklPrev = pOldKL->pklPrev;
|
|
||||||
pOldKL->pklPrev->pklNext = pNewKL;
|
|
||||||
pOldKL->pklPrev = pNewKL;
|
|
||||||
gspklBaseLayout = pNewKL; /* Should we use UserAssignmentLock? */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Win: xxxActivateKeyboardLayout */
|
/* Win: xxxActivateKeyboardLayout */
|
||||||
HKL APIENTRY
|
HKL APIENTRY
|
||||||
co_IntActivateKeyboardLayout(
|
co_IntActivateKeyboardLayout(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue