mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
[WINSRV]
* Stop using ONEPARAM_ROUTINE_CSRSS_GUICHECK [WIN32K] * Move the manual gui check for console windows entirely in win32k * This shouldn't cause any regressions to the ancient gui-on-demand feature svn path=/trunk/; revision=65538
This commit is contained in:
parent
5967527b98
commit
5b12c58f87
8 changed files with 19 additions and 40 deletions
|
@ -24,7 +24,6 @@ extern HGDIOBJ StockObjects[];
|
|||
extern SHORT gusLanguageID;
|
||||
|
||||
SHORT FASTCALL UserGetLanguageID(VOID);
|
||||
VOID FASTCALL IntUserManualGuiCheck(LONG Check);
|
||||
PVOID APIENTRY HackSecureVirtualMemory(IN PVOID,IN SIZE_T,IN ULONG,OUT PVOID *);
|
||||
VOID APIENTRY HackUnsecureVirtualMemory(IN PVOID);
|
||||
|
||||
|
|
|
@ -3376,7 +3376,6 @@ typedef struct tagKMDDELPARAM
|
|||
|
||||
#define NOPARAM_ROUTINE_ISCONSOLEMODE 0xffff0001
|
||||
#define NOPARAM_ROUTINE_GETMESSAGEEXTRAINFO 0xffff0005
|
||||
#define ONEPARAM_ROUTINE_CSRSS_GUICHECK 0xffff0008
|
||||
#define ONEPARAM_ROUTINE_SWITCHCARETSHOWING 0xfffe0008
|
||||
#define ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING 0xfffe000d
|
||||
#define ONEPARAM_ROUTINE_GETDESKTOPMAPPING 0xfffe000e
|
||||
|
|
|
@ -74,28 +74,18 @@ co_IntGraphicsCheck(BOOL Create)
|
|||
|
||||
VOID
|
||||
FASTCALL
|
||||
IntUserManualGuiCheck(LONG Check)
|
||||
co_IntUserManualGuiCheck(BOOL Create)
|
||||
{
|
||||
PPROCESSINFO W32Data;
|
||||
PPROCESSINFO W32Data = (PPROCESSINFO)PsGetCurrentProcessWin32Process();
|
||||
W32Data->W32PF_flags |= W32PF_MANUALGUICHECK;
|
||||
|
||||
W32Data = PsGetCurrentProcessWin32Process();
|
||||
if (0 == Check)
|
||||
if (Create)
|
||||
{
|
||||
W32Data->W32PF_flags |= W32PF_MANUALGUICHECK;
|
||||
}
|
||||
else if (0 < Check)
|
||||
{
|
||||
if (! (W32Data->W32PF_flags & W32PF_CREATEDWINORDC))
|
||||
{
|
||||
co_AddGuiApp(W32Data);
|
||||
}
|
||||
co_AddGuiApp(W32Data);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (W32Data->W32PF_flags & W32PF_CREATEDWINORDC)
|
||||
{
|
||||
RemoveGuiApp(W32Data);
|
||||
}
|
||||
RemoveGuiApp(W32Data);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
BOOL FASTCALL co_IntGraphicsCheck(BOOL Create);
|
||||
VOID FASTCALL co_IntUserManualGuiCheck(LONG Check);
|
||||
BOOL FASTCALL IntCreatePrimarySurface(VOID);
|
||||
VOID FASTCALL IntDestroyPrimarySurface(VOID);
|
||||
|
||||
|
|
|
@ -292,10 +292,6 @@ NtUserCallOneParam(
|
|||
/* FIXME: Should use UserEnterShared */
|
||||
RETURN(UserEnumClipboardFormats(Param));
|
||||
|
||||
case ONEPARAM_ROUTINE_CSRSS_GUICHECK:
|
||||
IntUserManualGuiCheck(Param);
|
||||
RETURN(TRUE);
|
||||
|
||||
case ONEPARAM_ROUTINE_GETCURSORPOS:
|
||||
{
|
||||
BOOL Ret = TRUE;
|
||||
|
|
|
@ -619,6 +619,12 @@ static LRESULT co_UserFreeWindow(PWND Window,
|
|||
|
||||
IntDestroyScrollBars(Window);
|
||||
|
||||
if (Window->pcls->atomClassName == gaGuiConsoleWndClass)
|
||||
{
|
||||
/* Count only console windows manually */
|
||||
co_IntUserManualGuiCheck(FALSE);
|
||||
}
|
||||
|
||||
/* dereference the class */
|
||||
IntDereferenceClass(Window->pcls,
|
||||
Window->head.pti->pDeskInfo,
|
||||
|
@ -2313,6 +2319,12 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
|
|||
}
|
||||
}
|
||||
|
||||
if (Class->atomClassName == gaGuiConsoleWndClass)
|
||||
{
|
||||
/* Count only console windows manually */
|
||||
co_IntUserManualGuiCheck(TRUE);
|
||||
}
|
||||
|
||||
TRACE("co_UserCreateWindowEx(): Created window %p\n", hWnd);
|
||||
ret = Window;
|
||||
|
||||
|
|
|
@ -27,11 +27,6 @@
|
|||
#define PM_DESTROY_CONSOLE (WM_APP + 2)
|
||||
|
||||
|
||||
/* Not defined in any header file */
|
||||
extern VOID NTAPI PrivateCsrssManualGuiCheck(LONG Check);
|
||||
// See winsrv/usersrv/init.c line 234
|
||||
|
||||
|
||||
/* GLOBALS ********************************************************************/
|
||||
|
||||
typedef struct _GUI_INIT_INFO
|
||||
|
@ -170,8 +165,6 @@ GuiConsoleInputThread(PVOID Data)
|
|||
|
||||
DPRINT("PM_CREATE_CONSOLE -- creating window\n");
|
||||
|
||||
PrivateCsrssManualGuiCheck(-1); // co_AddGuiApp
|
||||
|
||||
NewWindow = CreateWindowExW(WS_EX_CLIENTEDGE,
|
||||
GUI_CONWND_CLASS,
|
||||
Console->Title.Buffer,
|
||||
|
@ -187,7 +180,6 @@ GuiConsoleInputThread(PVOID Data)
|
|||
if (NewWindow == NULL)
|
||||
{
|
||||
DPRINT1("Failed to create a new console window\n");
|
||||
PrivateCsrssManualGuiCheck(+1); // RemoveGuiApp
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -260,7 +252,6 @@ GuiConsoleInputThread(PVOID Data)
|
|||
if (GuiData->hWindow == NULL) continue;
|
||||
|
||||
DestroyWindow(GuiData->hWindow);
|
||||
PrivateCsrssManualGuiCheck(+1); // RemoveGuiApp
|
||||
|
||||
NtSetEvent(GuiData->hGuiTermEvent, NULL);
|
||||
|
||||
|
|
|
@ -90,14 +90,6 @@ BOOL WINAPI _UserSoundSentry(VOID)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
// From win32ss/user/win32csr/dllmain.c
|
||||
VOID
|
||||
WINAPI
|
||||
PrivateCsrssManualGuiCheck(LONG Check)
|
||||
{
|
||||
NtUserCallOneParam(Check, ONEPARAM_ROUTINE_CSRSS_GUICHECK);
|
||||
}
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
CreateSystemThreads(PVOID pParam)
|
||||
|
@ -152,7 +144,6 @@ CSR_SERVER_DLL_INIT(UserServerDllInitialization)
|
|||
|
||||
/* Initialize the video */
|
||||
NtUserInitialize(0, NULL, NULL);
|
||||
PrivateCsrssManualGuiCheck(0);
|
||||
|
||||
/* Setup the DLL Object */
|
||||
LoadedServerDll->ApiBase = USERSRV_FIRST_API_NUMBER;
|
||||
|
|
Loading…
Reference in a new issue