Author: gadamopoulos
Date: Mon Dec 1 09:38:04 2014
New Revision: 65538
URL:
http://svn.reactos.org/svn/reactos?rev=65538&view=rev
Log:
[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
Modified:
trunk/reactos/win32ss/gdi/ntgdi/misc.h
trunk/reactos/win32ss/include/ntuser.h
trunk/reactos/win32ss/user/ntuser/guicheck.c
trunk/reactos/win32ss/user/ntuser/guicheck.h
trunk/reactos/win32ss/user/ntuser/simplecall.c
trunk/reactos/win32ss/user/ntuser/window.c
trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c
trunk/reactos/win32ss/user/winsrv/usersrv/init.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/misc.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/misc.h?r…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/misc.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/misc.h [iso-8859-1] Mon Dec 1 09:38:04 2014
@@ -24,7 +24,6 @@
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);
Modified: trunk/reactos/win32ss/include/ntuser.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/include/ntuser.h?r…
==============================================================================
--- trunk/reactos/win32ss/include/ntuser.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/include/ntuser.h [iso-8859-1] Mon Dec 1 09:38:04 2014
@@ -3376,7 +3376,6 @@
#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
Modified: trunk/reactos/win32ss/user/ntuser/guicheck.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/guiche…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/guicheck.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/guicheck.c [iso-8859-1] Mon Dec 1 09:38:04 2014
@@ -74,28 +74,18 @@
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);
}
}
Modified: trunk/reactos/win32ss/user/ntuser/guicheck.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/guiche…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/guicheck.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/guicheck.h [iso-8859-1] Mon Dec 1 09:38:04 2014
@@ -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);
Modified: trunk/reactos/win32ss/user/ntuser/simplecall.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/simple…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/simplecall.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/simplecall.c [iso-8859-1] Mon Dec 1 09:38:04 2014
@@ -291,10 +291,6 @@
case ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS:
/* FIXME: Should use UserEnterShared */
RETURN(UserEnumClipboardFormats(Param));
-
- case ONEPARAM_ROUTINE_CSRSS_GUICHECK:
- IntUserManualGuiCheck(Param);
- RETURN(TRUE);
case ONEPARAM_ROUTINE_GETCURSORPOS:
{
Modified: trunk/reactos/win32ss/user/ntuser/window.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/window…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/window.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/window.c [iso-8859-1] Mon Dec 1 09:38:04 2014
@@ -618,6 +618,12 @@
UserDeleteObject(Window->head.h, TYPE_WINDOW);
IntDestroyScrollBars(Window);
+
+ if (Window->pcls->atomClassName == gaGuiConsoleWndClass)
+ {
+ /* Count only console windows manually */
+ co_IntUserManualGuiCheck(FALSE);
+ }
/* dereference the class */
IntDereferenceClass(Window->pcls,
@@ -2313,6 +2319,12 @@
}
}
+ if (Class->atomClassName == gaGuiConsoleWndClass)
+ {
+ /* Count only console windows manually */
+ co_IntUserManualGuiCheck(TRUE);
+ }
+
TRACE("co_UserCreateWindowEx(): Created window %p\n", hWnd);
ret = Window;
Modified: trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c [iso-8859-1]
(original)
+++ trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c [iso-8859-1] Mon Dec
1 09:38:04 2014
@@ -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
@@ -169,8 +164,6 @@
RECT rcWnd;
DPRINT("PM_CREATE_CONSOLE -- creating window\n");
-
- PrivateCsrssManualGuiCheck(-1); // co_AddGuiApp
NewWindow = CreateWindowExW(WS_EX_CLIENTEDGE,
GUI_CONWND_CLASS,
@@ -187,7 +180,6 @@
if (NewWindow == NULL)
{
DPRINT1("Failed to create a new console window\n");
- PrivateCsrssManualGuiCheck(+1); // RemoveGuiApp
continue;
}
@@ -260,7 +252,6 @@
if (GuiData->hWindow == NULL) continue;
DestroyWindow(GuiData->hWindow);
- PrivateCsrssManualGuiCheck(+1); // RemoveGuiApp
NtSetEvent(GuiData->hGuiTermEvent, NULL);
Modified: trunk/reactos/win32ss/user/winsrv/usersrv/init.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/usersr…
==============================================================================
--- trunk/reactos/win32ss/user/winsrv/usersrv/init.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/winsrv/usersrv/init.c [iso-8859-1] Mon Dec 1 09:38:04
2014
@@ -90,14 +90,6 @@
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 @@
/* Initialize the video */
NtUserInitialize(0, NULL, NULL);
- PrivateCsrssManualGuiCheck(0);
/* Setup the DLL Object */
LoadedServerDll->ApiBase = USERSRV_FIRST_API_NUMBER;