mirror of
https://github.com/reactos/reactos.git
synced 2025-07-27 21:22:24 +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
|
||||
CleanupDesktopImpl(VOID);
|
||||
|
||||
PRECT FASTCALL
|
||||
IntGetDesktopWorkArea(PDESKTOP_OBJECT Desktop);
|
||||
|
||||
LRESULT CALLBACK
|
||||
IntDesktopWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* 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
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -107,6 +107,29 @@ IntValidateDesktopHandle(
|
|||
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
|
||||
IntGetActiveDesktop(VOID)
|
||||
{
|
||||
|
@ -357,23 +380,12 @@ NtUserCreateDesktop(
|
|||
return NULL;
|
||||
}
|
||||
|
||||
// init desktop area
|
||||
DesktopObject->WorkArea.left = 0;
|
||||
DesktopObject->WorkArea.top = 0;
|
||||
DesktopObject->WorkArea.right = -1;
|
||||
DesktopObject->WorkArea.bottom = -1;
|
||||
if(ScreenDeviceContext)
|
||||
{
|
||||
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);
|
||||
}
|
||||
IntGetDesktopWorkArea(DesktopObject);
|
||||
|
||||
/* Initialize some local (to win32k) desktop state. */
|
||||
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
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -457,27 +457,7 @@ NtUserSystemParametersInfo(
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
Rect = (PRECT)Desktop->WorkArea;
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Rect = IntGetDesktopWorkArea(Desktop);
|
||||
|
||||
Status = MmCopyToCaller((PRECT)pvParam, Desktop->WorkArea, sizeof(RECT));
|
||||
if(!NT_SUCCESS(Status))
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* 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
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -200,7 +200,7 @@ WinPosInitInternalPos(PWINDOW_OBJECT WindowObject, POINT pt, PRECT RestoreRect)
|
|||
RECT WorkArea;
|
||||
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));
|
||||
if(!WindowObject->InternalPos)
|
||||
|
@ -362,7 +362,7 @@ WinPosGetMinMaxInfo(PWINDOW_OBJECT Window, POINT* MaxSize, POINT* MaxPos,
|
|||
RECT WorkArea;
|
||||
PDESKTOP_OBJECT Desktop = PsGetWin32Thread()->Desktop; /* Or rather get it from the window? */
|
||||
|
||||
WorkArea = (*(RECT*)Desktop->WorkArea);
|
||||
WorkArea = *IntGetDesktopWorkArea(Desktop);
|
||||
|
||||
/* Get default values. */
|
||||
MinMax.ptMaxSize.x = WorkArea.right - WorkArea.left;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue