mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 11:17:45 +00:00
parent
10a5200e1f
commit
fcc222c28a
4 changed files with 68 additions and 8 deletions
|
@ -2038,10 +2038,10 @@ NTAPI
|
||||||
NtUserDestroyWindow(
|
NtUserDestroyWindow(
|
||||||
HWND Wnd);
|
HWND Wnd);
|
||||||
|
|
||||||
DWORD
|
BOOL
|
||||||
NTAPI
|
NTAPI
|
||||||
NtUserDisableThreadIme(
|
NtUserDisableThreadIme(
|
||||||
DWORD dwUnknown1);
|
DWORD dwThreadID);
|
||||||
|
|
||||||
LRESULT
|
LRESULT
|
||||||
NTAPI
|
NTAPI
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
DBG_DEFAULT_CHANNEL(UserMisc);
|
DBG_DEFAULT_CHANNEL(UserMisc);
|
||||||
|
|
||||||
|
#define INVALID_THREAD_ID ((ULONG)-1)
|
||||||
|
|
||||||
UINT FASTCALL
|
UINT FASTCALL
|
||||||
IntImmProcessKey(PUSER_MESSAGE_QUEUE MessageQueue, PWND pWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
IntImmProcessKey(PUSER_MESSAGE_QUEUE MessageQueue, PWND pWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||||
|
@ -80,14 +81,72 @@ NtUserCheckImeHotKey(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOL
|
||||||
DWORD
|
|
||||||
APIENTRY
|
APIENTRY
|
||||||
NtUserDisableThreadIme(
|
NtUserDisableThreadIme(
|
||||||
DWORD dwUnknown1)
|
DWORD dwThreadID)
|
||||||
{
|
{
|
||||||
STUB;
|
PTHREADINFO pti, ptiCurrent;
|
||||||
return 0;
|
PPROCESSINFO ppi;
|
||||||
|
BOOL ret = FALSE;
|
||||||
|
|
||||||
|
UserEnterExclusive();
|
||||||
|
|
||||||
|
if (!IS_IMM_MODE())
|
||||||
|
{
|
||||||
|
EngSetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
|
goto Quit;
|
||||||
|
}
|
||||||
|
|
||||||
|
ptiCurrent = GetW32ThreadInfo();
|
||||||
|
|
||||||
|
if (dwThreadID == INVALID_THREAD_ID)
|
||||||
|
{
|
||||||
|
ppi = ptiCurrent->ppi;
|
||||||
|
ppi->W32PF_flags |= W32PF_DISABLEIME;
|
||||||
|
|
||||||
|
Retry:
|
||||||
|
for (pti = ppi->ptiList; pti; pti = pti->ptiSibling)
|
||||||
|
{
|
||||||
|
pti->TIF_flags |= TIF_DISABLEIME;
|
||||||
|
|
||||||
|
if (pti->spwndDefaultIme)
|
||||||
|
{
|
||||||
|
co_UserDestroyWindow(pti->spwndDefaultIme);
|
||||||
|
pti->spwndDefaultIme = NULL;
|
||||||
|
goto Retry; /* The contents of ppi->ptiList may be changed. */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (dwThreadID == 0)
|
||||||
|
{
|
||||||
|
pti = ptiCurrent;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pti = IntTID2PTI(UlongToHandle(dwThreadID));
|
||||||
|
|
||||||
|
/* The thread needs to reside in the current process. */
|
||||||
|
if (!pti || pti->ppi != ptiCurrent->ppi)
|
||||||
|
goto Quit;
|
||||||
|
}
|
||||||
|
|
||||||
|
pti->TIF_flags |= TIF_DISABLEIME;
|
||||||
|
|
||||||
|
if (pti->spwndDefaultIme)
|
||||||
|
{
|
||||||
|
co_UserDestroyWindow(pti->spwndDefaultIme);
|
||||||
|
pti->spwndDefaultIme = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = TRUE;
|
||||||
|
|
||||||
|
Quit:
|
||||||
|
UserLeave();
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#define RETURN(value) { _ret_ = value; goto _cleanup_; }
|
#define RETURN(value) { _ret_ = value; goto _cleanup_; }
|
||||||
#define CLEANUP /*unreachable*/ ASSERT(FALSE); _cleanup_
|
#define CLEANUP /*unreachable*/ ASSERT(FALSE); _cleanup_
|
||||||
#define END_CLEANUP return _ret_;
|
#define END_CLEANUP return _ret_;
|
||||||
|
#define IS_IMM_MODE() (gpsi && (gpsi->dwSRVIFlags & SRVINFO_IMM32))
|
||||||
|
|
||||||
#define UserEnterCo UserEnterExclusive
|
#define UserEnterCo UserEnterExclusive
|
||||||
#define UserLeaveCo UserLeave
|
#define UserLeaveCo UserLeave
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#define W32PF_OLELOADED 0x00100000
|
#define W32PF_OLELOADED 0x00100000
|
||||||
#define W32PF_SCREENSAVER 0x00200000
|
#define W32PF_SCREENSAVER 0x00200000
|
||||||
#define W32PF_IDLESCREENSAVER 0x00400000
|
#define W32PF_IDLESCREENSAVER 0x00400000
|
||||||
|
#define W32PF_DISABLEIME 0x00800000
|
||||||
#define W32PF_ICONTITLEREGISTERED 0x10000000
|
#define W32PF_ICONTITLEREGISTERED 0x10000000
|
||||||
#define W32PF_DPIAWARE 0x20000000
|
#define W32PF_DPIAWARE 0x20000000
|
||||||
// ReactOS
|
// ReactOS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue