Author: fireball
Date: Wed Feb 2 13:38:49 2011
New Revision: 50591
URL:
http://svn.reactos.org/svn/reactos?rev=50591&view=rev
Log:
- Add an update routine which resizes the SWM root window to the primary surface size.
See issue #5876 for more details.
Modified:
branches/arwinss/reactos/subsystems/win32/win32k/eng/device.c
branches/arwinss/reactos/subsystems/win32/win32k/include/swm.h
branches/arwinss/reactos/subsystems/win32/win32k/swm/winman.c
Modified: branches/arwinss/reactos/subsystems/win32/win32k/eng/device.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/eng/device.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/eng/device.c [iso-8859-1] Wed Feb 2
13:38:49 2011
@@ -534,6 +534,7 @@
SurfaceRect.left = SurfaceRect.top = 0;
SurfaceRect.right = SurfObj->sizlBitmap.cx;
SurfaceRect.bottom = SurfObj->sizlBitmap.cy;
+ SwmUpdateRootWindow(SurfObj);
//EngEraseSurface(SurfObj, &SurfaceRect, 0);
/* Give the PDEV a MovePointer function */
@@ -552,6 +553,7 @@
(SurfaceRect.bottom - SurfaceRect.top) / 2);
EngUnlockSurface(SurfObj);
+ CsrNotifyShowDesktop(NULL, SurfSize.cx, SurfSize.cy);
// Init Primary Displays Device Capabilities.
//IntvGetDeviceCaps(&PrimarySurface, &GdiHandleTable->DevCaps);
Modified: branches/arwinss/reactos/subsystems/win32/win32k/include/swm.h
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/include/swm.h [iso-8859-1]
(original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/include/swm.h [iso-8859-1] Wed Feb 2
13:38:49 2011
@@ -15,7 +15,7 @@
extern SWM_WINDOW SwmRoot;
VOID NTAPI SwmInitialize();
-VOID NTAPI GrContextInit();
+VOID NTAPI SwmUpdateRootWindow(SURFOBJ *SurfObj);
PSWM_WINDOW NTAPI SwmFindByHwnd(HWND hWnd);
VOID NTAPI SwmAcquire(VOID);
VOID NTAPI SwmRelease(VOID);
Modified: branches/arwinss/reactos/subsystems/win32/win32k/swm/winman.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
==============================================================================
--- branches/arwinss/reactos/subsystems/win32/win32k/swm/winman.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/subsystems/win32/win32k/swm/winman.c [iso-8859-1] Wed Feb 2
13:38:49 2011
@@ -932,30 +932,44 @@
VOID
NTAPI
-SwmInitialize()
-{
- NTSTATUS Status;
-
- /* Initialize handles list and a spinlock */
- InitializeListHead(&SwmWindows);
-
- /* Initialize SWM access resource */
- Status = ExInitializeResourceLite(&SwmLock);
-
- if (!NT_SUCCESS(Status))
- {
- DPRINT1("Failure initializing SWM resource!\n");
- }
-
+SwmUpdateRootWindow(SURFOBJ *SurfObj)
+{
/* Initialize a root window */
SwmRoot.Window.left = 0;
SwmRoot.Window.top = 0;
- SwmRoot.Window.right = 800; //FIXME!
- SwmRoot.Window.bottom = 600; //FIXME!
+ SwmRoot.Window.right = SurfObj->sizlBitmap.cx;
+ SwmRoot.Window.bottom = SurfObj->sizlBitmap.cy;
+ SwmRoot.Hidden = FALSE;
+ SwmRoot.Topmost = FALSE;
+
+ set_region_rect(SwmRoot.Visible, &SwmRoot.Window);
+}
+
+VOID
+NTAPI
+SwmInitialize()
+{
+ NTSTATUS Status;
+
+ /* Initialize handles list and a spinlock */
+ InitializeListHead(&SwmWindows);
+
+ /* Initialize SWM access resource */
+ Status = ExInitializeResourceLite(&SwmLock);
+
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("Failure initializing SWM resource!\n");
+ }
+
+ /* Initialize a root window */
+ SwmRoot.Window.left = 0;
+ SwmRoot.Window.top = 0;
+ SwmRoot.Window.right = 0;
+ SwmRoot.Window.bottom = 0;
SwmRoot.Hidden = FALSE;
SwmRoot.Topmost = FALSE;
SwmRoot.Visible = create_empty_region();
- set_region_rect(SwmRoot.Visible, &SwmRoot.Window);
InsertHeadList(&SwmWindows, &SwmRoot.Entry);
}