mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 07:52:56 +00:00
fixed hardcoded workarea size
svn path=/trunk/; revision=7243
This commit is contained in:
parent
b68bca0e99
commit
f90a37f641
4 changed files with 34 additions and 39 deletions
|
@ -19,6 +19,9 @@ InitDesktopImpl(VOID);
|
||||||
NTSTATUS FASTCALL
|
NTSTATUS FASTCALL
|
||||||
CleanupDesktopImpl(VOID);
|
CleanupDesktopImpl(VOID);
|
||||||
|
|
||||||
|
PRECT FASTCALL
|
||||||
|
IntGetDesktopWorkArea(PDESKTOP_OBJECT Desktop);
|
||||||
|
|
||||||
LRESULT CALLBACK
|
LRESULT CALLBACK
|
||||||
IntDesktopWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
IntDesktopWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*
|
*
|
||||||
* $Id: desktop.c,v 1.7 2003/12/26 00:47:18 weiden Exp $
|
* $Id: desktop.c,v 1.8 2003/12/26 00:58:33 weiden Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -107,6 +107,29 @@ IntValidateDesktopHandle(
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PRECT FASTCALL
|
||||||
|
IntGetDesktopWorkArea(PDESKTOP_OBJECT Desktop)
|
||||||
|
{
|
||||||
|
PRECT Ret;
|
||||||
|
|
||||||
|
Ret = &Desktop->WorkArea;
|
||||||
|
if((Ret->right == -1) && ScreenDeviceContext)
|
||||||
|
{
|
||||||
|
PDC dc;
|
||||||
|
PSURFOBJ SurfObj;
|
||||||
|
dc = DC_LockDc(ScreenDeviceContext);
|
||||||
|
SurfObj = (PSURFOBJ)AccessUserObject((ULONG) dc->Surface);
|
||||||
|
if(SurfObj)
|
||||||
|
{
|
||||||
|
Ret->right = SurfObj->sizlBitmap.cx;
|
||||||
|
Ret->bottom = SurfObj->sizlBitmap.cy;
|
||||||
|
}
|
||||||
|
DC_UnlockDc(ScreenDeviceContext);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Ret;
|
||||||
|
}
|
||||||
|
|
||||||
PDESKTOP_OBJECT FASTCALL
|
PDESKTOP_OBJECT FASTCALL
|
||||||
IntGetActiveDesktop(VOID)
|
IntGetActiveDesktop(VOID)
|
||||||
{
|
{
|
||||||
|
@ -357,23 +380,12 @@ NtUserCreateDesktop(
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// init desktop area
|
||||||
DesktopObject->WorkArea.left = 0;
|
DesktopObject->WorkArea.left = 0;
|
||||||
DesktopObject->WorkArea.top = 0;
|
DesktopObject->WorkArea.top = 0;
|
||||||
DesktopObject->WorkArea.right = -1;
|
DesktopObject->WorkArea.right = -1;
|
||||||
DesktopObject->WorkArea.bottom = -1;
|
DesktopObject->WorkArea.bottom = -1;
|
||||||
if(ScreenDeviceContext)
|
IntGetDesktopWorkArea(DesktopObject);
|
||||||
{
|
|
||||||
PDC dc;
|
|
||||||
PSURFOBJ SurfObj;
|
|
||||||
dc = DC_LockDc(ScreenDeviceContext);
|
|
||||||
SurfObj = (PSURFOBJ)AccessUserObject((ULONG) dc->Surface);
|
|
||||||
if(SurfObj)
|
|
||||||
{
|
|
||||||
DesktopObject->WorkArea.right = SurfObj->sizlBitmap.cx;
|
|
||||||
DesktopObject->WorkArea.bottom = SurfObj->sizlBitmap.cy;
|
|
||||||
}
|
|
||||||
DC_UnlockDc(ScreenDeviceContext);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Initialize some local (to win32k) desktop state. */
|
/* Initialize some local (to win32k) desktop state. */
|
||||||
DesktopObject->ActiveMessageQueue = NULL;
|
DesktopObject->ActiveMessageQueue = NULL;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: misc.c,v 1.40 2003/12/26 00:47:18 weiden Exp $
|
/* $Id: misc.c,v 1.41 2003/12/26 00:58:33 weiden Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -457,27 +457,7 @@ NtUserSystemParametersInfo(
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
Rect = (PRECT)Desktop->WorkArea;
|
Rect = IntGetDesktopWorkArea(Desktop);
|
||||||
if(Rect->right == -1)
|
|
||||||
{
|
|
||||||
HDC hDC;
|
|
||||||
PDC dc;
|
|
||||||
PSURFOBJ SurfObj;
|
|
||||||
|
|
||||||
hDC = IntGetScreenDC();
|
|
||||||
if(hDC)
|
|
||||||
{
|
|
||||||
dc = DC_LockDc(hDC);
|
|
||||||
if(dc && (SurfObj = (PSURFOBJ)AccessUserObject((ULONG) dc->Surface)))
|
|
||||||
{
|
|
||||||
Rect->left = 0;
|
|
||||||
Rect->top = 0;
|
|
||||||
Rect->right = SurfObj->sizlBitmap.cx;
|
|
||||||
Rect->bottom = SurfObj->sizlBitmap.cy;
|
|
||||||
DC_UnlockDc(hDC);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Status = MmCopyToCaller((PRECT)pvParam, Desktop->WorkArea, sizeof(RECT));
|
Status = MmCopyToCaller((PRECT)pvParam, Desktop->WorkArea, sizeof(RECT));
|
||||||
if(!NT_SUCCESS(Status))
|
if(!NT_SUCCESS(Status))
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: winpos.c,v 1.67 2003/12/23 21:33:25 weiden Exp $
|
/* $Id: winpos.c,v 1.68 2003/12/26 00:58:33 weiden Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -200,7 +200,7 @@ WinPosInitInternalPos(PWINDOW_OBJECT WindowObject, POINT pt, PRECT RestoreRect)
|
||||||
RECT WorkArea;
|
RECT WorkArea;
|
||||||
PDESKTOP_OBJECT Desktop = PsGetWin32Thread()->Desktop; /* Or rather get it from the window? */
|
PDESKTOP_OBJECT Desktop = PsGetWin32Thread()->Desktop; /* Or rather get it from the window? */
|
||||||
|
|
||||||
WorkArea = (*(RECT*)Desktop->WorkArea);
|
WorkArea = *IntGetDesktopWorkArea(Desktop);
|
||||||
|
|
||||||
WindowObject->InternalPos = ExAllocatePool(NonPagedPool, sizeof(INTERNALPOS));
|
WindowObject->InternalPos = ExAllocatePool(NonPagedPool, sizeof(INTERNALPOS));
|
||||||
if(!WindowObject->InternalPos)
|
if(!WindowObject->InternalPos)
|
||||||
|
@ -362,7 +362,7 @@ WinPosGetMinMaxInfo(PWINDOW_OBJECT Window, POINT* MaxSize, POINT* MaxPos,
|
||||||
RECT WorkArea;
|
RECT WorkArea;
|
||||||
PDESKTOP_OBJECT Desktop = PsGetWin32Thread()->Desktop; /* Or rather get it from the window? */
|
PDESKTOP_OBJECT Desktop = PsGetWin32Thread()->Desktop; /* Or rather get it from the window? */
|
||||||
|
|
||||||
WorkArea = (*(RECT*)Desktop->WorkArea);
|
WorkArea = *IntGetDesktopWorkArea(Desktop);
|
||||||
|
|
||||||
/* Get default values. */
|
/* Get default values. */
|
||||||
MinMax.ptMaxSize.x = WorkArea.right - WorkArea.left;
|
MinMax.ptMaxSize.x = WorkArea.right - WorkArea.left;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue