mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
Misc. user fixes.
svn path=/trunk/; revision=3516
This commit is contained in:
@@ -55,11 +55,11 @@ VOID MouseGDICallBack(PMOUSE_INPUT_DATA Data, ULONG InputCount)
|
||||
{
|
||||
ULONG i;
|
||||
LONG mouse_cx = 0, mouse_cy = 0;
|
||||
/* HDC hDC = RetrieveDisplayHDC();
|
||||
PDC dc = DC_HandleToPtr(hDC);
|
||||
PSURFOBJ SurfObj = (PSURFOBJ)AccessUserObject(dc->Surface);
|
||||
PSURFGDI SurfGDI = (PSURFGDI)AccessInternalObject(dc->Surface);
|
||||
RECTL MouseRect; */
|
||||
HDC hDC = W32kGetScreenDC();
|
||||
PDC dc;
|
||||
PSURFOBJ SurfObj;
|
||||
PSURFGDI SurfGDI;
|
||||
RECTL MouseRect;
|
||||
|
||||
PDEVICE_OBJECT ClassDeviceObject = NULL;
|
||||
PFILE_OBJECT FileObject = NULL;
|
||||
@@ -69,6 +69,15 @@ VOID MouseGDICallBack(PMOUSE_INPUT_DATA Data, ULONG InputCount)
|
||||
KEVENT event;
|
||||
PIRP irp;
|
||||
|
||||
if (hDC == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
dc = DC_HandleToPtr(hDC);
|
||||
SurfObj = (PSURFOBJ)AccessUserObject(dc->Surface);
|
||||
SurfGDI = (PSURFGDI)AccessInternalObject(dc->Surface);
|
||||
|
||||
// Compile the total mouse movement change
|
||||
for (i=0; i<InputCount; i++)
|
||||
{
|
||||
@@ -87,53 +96,13 @@ VOID MouseGDICallBack(PMOUSE_INPUT_DATA Data, ULONG InputCount)
|
||||
if(mouse_y > 460) mouse_y = 460;
|
||||
|
||||
if((SafetySwitch == FALSE) && (SafetySwitch2 == FALSE)) ;
|
||||
/* SurfGDI->MovePointer(SurfObj, mouse_x, mouse_y, &MouseRect); */
|
||||
SurfGDI->MovePointer(SurfObj, mouse_x, mouse_y, &MouseRect);
|
||||
}
|
||||
}
|
||||
|
||||
NTSTATUS ConnectMouseClassDriver()
|
||||
VOID EnableMouse(HDC hDisplayDC)
|
||||
{
|
||||
PDEVICE_OBJECT ClassDeviceObject = NULL;
|
||||
PFILE_OBJECT FileObject = NULL;
|
||||
NTSTATUS status;
|
||||
UNICODE_STRING ClassName = UNICODE_STRING_INITIALIZER(L"\\Device\\MouseClass");
|
||||
IO_STATUS_BLOCK ioStatus;
|
||||
KEVENT event;
|
||||
PIRP irp;
|
||||
GDI_INFORMATION GDIInformation;
|
||||
|
||||
status = IoGetDeviceObjectPointer(&ClassName, FILE_READ_ATTRIBUTES, &FileObject, &ClassDeviceObject);
|
||||
|
||||
if(status != STATUS_SUCCESS)
|
||||
{
|
||||
DbgPrint("Win32k: Could not connect to mouse class driver\n");
|
||||
return status;
|
||||
}
|
||||
|
||||
// Connect our callback to the class driver
|
||||
|
||||
KeInitializeEvent(&event, NotificationEvent, FALSE);
|
||||
|
||||
GDIInformation.CallBack = MouseGDICallBack;
|
||||
|
||||
irp = IoBuildDeviceIoControlRequest(IOCTL_INTERNAL_MOUSE_CONNECT,
|
||||
ClassDeviceObject, &GDIInformation, sizeof(CLASS_INFORMATION), NULL, 0, TRUE, &event, &ioStatus);
|
||||
|
||||
status = IoCallDriver(ClassDeviceObject, irp);
|
||||
|
||||
if (status == STATUS_PENDING) {
|
||||
KeWaitForSingleObject(&event, Suspended, KernelMode, FALSE, NULL);
|
||||
} else {
|
||||
ioStatus.Status = status;
|
||||
}
|
||||
|
||||
return ioStatus.Status;
|
||||
}
|
||||
/*
|
||||
void TestMouse()
|
||||
{
|
||||
HDC hDC = RetrieveDisplayHDC();
|
||||
PDC dc = DC_HandleToPtr(hDC);
|
||||
PDC dc = DC_HandleToPtr(hDisplayDC);
|
||||
PSURFOBJ SurfObj = (PSURFOBJ)AccessUserObject(dc->Surface);
|
||||
PSURFGDI SurfGDI = (PSURFGDI)AccessInternalObject(dc->Surface);
|
||||
BOOL txt;
|
||||
@@ -182,10 +151,8 @@ void TestMouse()
|
||||
EngBitBlt(MouseSurf, SurfObj, NULL, NULL, NULL, &MouseRect, &ZeroPoint, NULL, NULL, NULL, 0);
|
||||
SurfGDI->SetPointerShape(SurfObj, MouseSurf, NULL, NULL, 0, 0, 50, 50, &MouseRect, 0);
|
||||
|
||||
// Connect the mouse class driver to the GDI
|
||||
mouse_x = 50;
|
||||
mouse_y = 50;
|
||||
ConnectMouseClassDriver();
|
||||
mouse_x = 320;
|
||||
mouse_y = 240;
|
||||
MouseEnabled = TRUE;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
VOID
|
||||
W32kGuiCheck(VOID);
|
||||
VOID
|
||||
W32kGraphicsCheck(VOID);
|
||||
|
||||
#endif /* __WIN32K_GUICHECK_H */
|
||||
|
||||
|
||||
@@ -3,5 +3,6 @@
|
||||
|
||||
INT MouseSafetyOnDrawStart(PSURFOBJ SurfObj, PSURFGDI SurfGDI, LONG HazardX1, LONG HazardY1, LONG HazardX2, LONG HazardY2);
|
||||
INT MouseSafetyOnDrawEnd(PSURFOBJ SurfObj, PSURFGDI SurfGDI);
|
||||
VOID EnableMouse(HDC hDisplayDC);
|
||||
|
||||
#endif /* __WIN32K_MOUSE_H */
|
||||
|
||||
@@ -15,18 +15,11 @@ typedef struct _PROPERTY
|
||||
ATOM Atom;
|
||||
} PROPERTY, *PPROPERTY;
|
||||
|
||||
typedef struct _INTERNALPOS
|
||||
{
|
||||
RECT NormalRect;
|
||||
POINT IconPos;
|
||||
POINT MaxPos;
|
||||
HWND IconTitle;
|
||||
} INTERNALPOS, *PINTERNALPOS;
|
||||
VOID
|
||||
WinPosSetupInternalPos(VOID);
|
||||
|
||||
typedef struct _WINDOW_OBJECT
|
||||
{
|
||||
/* Internal position. */
|
||||
PINTERNALPOS InternalPos;
|
||||
/* Pointer to the window class. */
|
||||
PWNDCLASS_OBJECT Class;
|
||||
/* Extended style. */
|
||||
|
||||
@@ -34,6 +34,10 @@ LRESULT CALLBACK
|
||||
W32kDesktopWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
||||
PDESKTOP_OBJECT
|
||||
W32kGetActiveDesktop(VOID);
|
||||
VOID
|
||||
W32kInitializeDesktopGraphics(VOID);
|
||||
HDC
|
||||
W32kGetScreenDC(VOID);
|
||||
|
||||
#endif /* __WIN32K_WINSTA_H */
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: dllmain.c,v 1.29 2002/09/08 10:23:51 chorns Exp $
|
||||
/* $Id: dllmain.c,v 1.30 2002/09/17 23:43:28 dwelch Exp $
|
||||
*
|
||||
* Entry Point for win32k.sys
|
||||
*/
|
||||
@@ -54,6 +54,8 @@ DllMain (
|
||||
*/
|
||||
PsEstablishWin32Callouts(0, 0, 0, 0, sizeof(W32THREAD), sizeof(W32PROCESS));
|
||||
|
||||
WinPosSetupInternalPos();
|
||||
|
||||
Status = InitWindowStationImpl();
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: guicheck.c,v 1.8 2002/09/08 10:23:52 chorns Exp $
|
||||
/* $Id: guicheck.c,v 1.9 2002/09/17 23:43:28 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
@@ -27,11 +27,25 @@
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
/* GLOBALS *******************************************************************/
|
||||
|
||||
static ULONG NrGuiApplicationsRunning = 0;
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
VOID
|
||||
W32kGuiCheck(VOID)
|
||||
W32kGraphicsCheck(VOID)
|
||||
{
|
||||
if (NrGuiApplicationsRunning == 0)
|
||||
{
|
||||
W32kInitializeDesktopGraphics();
|
||||
}
|
||||
NrGuiApplicationsRunning++;
|
||||
}
|
||||
|
||||
VOID
|
||||
W32kGuiCheck(VOID)
|
||||
{
|
||||
if (PsGetWin32Process() == NULL)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: input.c,v 1.2 2002/08/20 20:37:19 hyperion Exp $
|
||||
/* $Id: input.c,v 1.3 2002/09/17 23:43:28 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
@@ -18,18 +18,22 @@
|
||||
#include <include/error.h>
|
||||
#include <include/winsta.h>
|
||||
#include <include/msgqueue.h>
|
||||
#include "../../drivers/input/include/mouse.h"
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
/* GLOBALS *******************************************************************/
|
||||
|
||||
static HANDLE MouseDeviceHandle;
|
||||
static HANDLE KeyboardThreadHandle;
|
||||
static CLIENT_ID KeyboardThreadId;
|
||||
static HANDLE KeyboardDeviceHandle;
|
||||
static KEVENT InputThreadsStart;
|
||||
static BOOLEAN InputThreadsRunning = FALSE;
|
||||
|
||||
VOID MouseGDICallBack(PMOUSE_INPUT_DATA Data, ULONG InputCount);
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
NTSTATUS STDCALL STATIC
|
||||
@@ -139,6 +143,14 @@ NTSTATUS
|
||||
InitInputImpl(VOID)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
UNICODE_STRING MouseDeviceName;
|
||||
OBJECT_ATTRIBUTES MouseObjectAttributes;
|
||||
IO_STATUS_BLOCK Iosb;
|
||||
PIRP Irp;
|
||||
PFILE_OBJECT FileObject;
|
||||
GDI_INFORMATION GdiInfo;
|
||||
KEVENT IoEvent;
|
||||
PIO_STACK_LOCATION StackPtr;
|
||||
|
||||
KeInitializeEvent(&InputThreadsStart, NotificationEvent, FALSE);
|
||||
|
||||
@@ -154,7 +166,70 @@ InitInputImpl(VOID)
|
||||
DbgPrint("W32K: Failed to create keyboard thread.\n");
|
||||
NtClose(KeyboardThreadHandle);
|
||||
}
|
||||
return(STATUS_SUCCESS);
|
||||
|
||||
/*
|
||||
* Connect to the mouse class driver.
|
||||
*/
|
||||
RtlInitUnicodeStringFromLiteral(&MouseDeviceName, L"\\??\\MouseClass");
|
||||
InitializeObjectAttributes(&MouseObjectAttributes,
|
||||
&MouseDeviceName,
|
||||
0,
|
||||
NULL,
|
||||
NULL);
|
||||
Status = NtOpenFile(&MouseDeviceHandle,
|
||||
FILE_ALL_ACCESS,
|
||||
&MouseObjectAttributes,
|
||||
&Iosb,
|
||||
0,
|
||||
0);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DbgPrint("W32K: Failed to open mouse.\n");
|
||||
return(Status);
|
||||
}
|
||||
Status = ObReferenceObjectByHandle(MouseDeviceHandle,
|
||||
FILE_READ_DATA | FILE_WRITE_DATA,
|
||||
IoFileObjectType,
|
||||
KernelMode,
|
||||
(PVOID *) &FileObject,
|
||||
NULL);
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DbgPrint("W32K: Failed to reference mouse file object.\n");
|
||||
return(Status);
|
||||
}
|
||||
KeInitializeEvent(&IoEvent, FALSE, NotificationEvent);
|
||||
GdiInfo.CallBack = MouseGDICallBack;
|
||||
Irp = IoBuildDeviceIoControlRequest(IOCTL_INTERNAL_MOUSE_CONNECT,
|
||||
FileObject->DeviceObject,
|
||||
&GdiInfo,
|
||||
sizeof(GdiInfo),
|
||||
NULL,
|
||||
0,
|
||||
TRUE,
|
||||
&FileObject->Event,
|
||||
&Iosb);
|
||||
StackPtr = IoGetNextIrpStackLocation(Irp);
|
||||
StackPtr->FileObject = FileObject;
|
||||
StackPtr->DeviceObject = FileObject->DeviceObject;
|
||||
StackPtr->Parameters.DeviceIoControl.InputBufferLength = sizeof(GdiInfo);
|
||||
StackPtr->Parameters.DeviceIoControl.OutputBufferLength = 0;
|
||||
|
||||
Status = IoCallDriver(FileObject->DeviceObject, Irp);
|
||||
if (Status == STATUS_PENDING)
|
||||
{
|
||||
KeWaitForSingleObject(&FileObject->Event, Executive, KernelMode, FALSE,
|
||||
NULL);
|
||||
Status = Iosb.Status;
|
||||
}
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DbgPrint("W32K: Failed to connect to mouse driver.\n");
|
||||
return(Status);
|
||||
}
|
||||
|
||||
return(STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: message.c,v 1.9 2002/08/26 23:20:54 dwelch Exp $
|
||||
/* $Id: message.c,v 1.10 2002/09/17 23:43:28 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
@@ -42,7 +42,7 @@ W32kCleanupMessageImpl(VOID)
|
||||
|
||||
|
||||
LRESULT STDCALL
|
||||
NtUserDispatchMessage(LPMSG lpMsg)
|
||||
NtUserDispatchMessage(CONST MSG* lpMsg)
|
||||
{
|
||||
LRESULT Result;
|
||||
ULONG PaintingFlag;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: painting.c,v 1.5 2002/08/31 23:18:47 dwelch Exp $
|
||||
/* $Id: painting.c,v 1.6 2002/09/17 23:43:28 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
@@ -733,7 +733,7 @@ PaintUpdateNCRegion(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags)
|
||||
}
|
||||
|
||||
BOOL STDCALL
|
||||
NtUserEndPaint(HWND hWnd, PAINTSTRUCT* lPs)
|
||||
NtUserEndPaint(HWND hWnd, CONST PAINTSTRUCT* lPs)
|
||||
{
|
||||
NtUserReleaseDC(hWnd, lPs->hdc);
|
||||
/* FIXME: Show claret. */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: window.c,v 1.17 2002/09/08 10:23:52 chorns Exp $
|
||||
/* $Id: window.c,v 1.18 2002/09/17 23:43:28 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
@@ -348,6 +348,7 @@ NtUserCreateWindowEx(DWORD dwExStyle,
|
||||
|
||||
/* Initialize gui state if necessary. */
|
||||
W32kGuiCheck();
|
||||
W32kGraphicsCheck();
|
||||
|
||||
if (!RtlCreateUnicodeString(&WindowName, lpWindowName->Buffer))
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: winpos.c,v 1.4 2002/08/31 23:18:47 dwelch Exp $
|
||||
/* $Id: winpos.c,v 1.5 2002/09/17 23:43:28 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
@@ -33,6 +33,8 @@
|
||||
|
||||
#define SWP_EX_PAINTSELF 0x0002
|
||||
|
||||
ATOM AtomInternalPos = NULL;
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
#define HAS_DLGFRAME(Style, ExStyle) \
|
||||
@@ -43,6 +45,27 @@
|
||||
(((Style) & WS_THICKFRAME) && \
|
||||
!((Style) & (WS_DLGFRAME | WS_BORDER)) == WS_DLGFRAME)
|
||||
|
||||
VOID
|
||||
WinPosSetupInternalPos(VOID)
|
||||
{
|
||||
AtomInternalPos = NtAddAtom(L"SysIP", (ATOM*)(PULONG)&AtomInternalPos);
|
||||
}
|
||||
|
||||
BOOL STDCALL
|
||||
NtUserGetClientOrigin(HWND hWnd, LPPOINT Point)
|
||||
{
|
||||
PWINDOW_OBJECT WindowObject;
|
||||
|
||||
WindowObject = W32kGetWindowObject(hWnd);
|
||||
if (WindowObject == NULL)
|
||||
{
|
||||
return(FALSE);
|
||||
}
|
||||
Point->x = WindowObject->ClientRect.left;
|
||||
Point->y = WindowObject->ClientRect.right;
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
BOOL
|
||||
WinPosActivateOtherWindow(PWINDOW_OBJECT Window)
|
||||
{
|
||||
@@ -62,7 +85,8 @@ WinPosCreateIconTitle(PWINDOW_OBJECT WindowObject)
|
||||
BOOL STATIC
|
||||
WinPosShowIconTitle(PWINDOW_OBJECT WindowObject, BOOL Show)
|
||||
{
|
||||
PINTERNALPOS InternalPos = WindowObject->InternalPos;
|
||||
PINTERNALPOS InternalPos = NtUserGetProp(WindowObject->Self,
|
||||
AtomInternalPos);
|
||||
PWINDOW_OBJECT IconWindow;
|
||||
NTSTATUS Status;
|
||||
|
||||
@@ -105,30 +129,31 @@ WinPosShowIconTitle(PWINDOW_OBJECT WindowObject, BOOL Show)
|
||||
PINTERNALPOS STATIC
|
||||
WinPosInitInternalPos(PWINDOW_OBJECT WindowObject, POINT pt, PRECT RestoreRect)
|
||||
{
|
||||
if (WindowObject->InternalPos == NULL)
|
||||
PINTERNALPOS InternalPos = NtUserGetProp(WindowObject->Self,
|
||||
AtomInternalPos);
|
||||
if (InternalPos == NULL)
|
||||
{
|
||||
WindowObject->InternalPos =
|
||||
InternalPos =
|
||||
ExAllocatePool(NonPagedPool, sizeof(INTERNALPOS));
|
||||
WindowObject->InternalPos->IconTitle = 0;
|
||||
WindowObject->InternalPos->NormalRect = WindowObject->WindowRect;
|
||||
WindowObject->InternalPos->IconPos.x =
|
||||
WindowObject->InternalPos->MaxPos.x = 0xFFFFFFFF;
|
||||
WindowObject->InternalPos->IconPos.y =
|
||||
WindowObject->InternalPos->MaxPos.y = 0xFFFFFFFF;
|
||||
NtUserSetProp(WindowObject->Self, AtomInternalPos, InternalPos);
|
||||
InternalPos->IconTitle = 0;
|
||||
InternalPos->NormalRect = WindowObject->WindowRect;
|
||||
InternalPos->IconPos.x = InternalPos->MaxPos.x = 0xFFFFFFFF;
|
||||
InternalPos->IconPos.y = InternalPos->MaxPos.y = 0xFFFFFFFF;
|
||||
}
|
||||
if (WindowObject->Style & WS_MINIMIZE)
|
||||
{
|
||||
WindowObject->InternalPos->IconPos = pt;
|
||||
InternalPos->IconPos = pt;
|
||||
}
|
||||
else if (WindowObject->Style & WS_MAXIMIZE)
|
||||
{
|
||||
WindowObject->InternalPos->MaxPos = pt;
|
||||
InternalPos->MaxPos = pt;
|
||||
}
|
||||
else if (RestoreRect != NULL)
|
||||
{
|
||||
WindowObject->InternalPos->NormalRect = *RestoreRect;
|
||||
InternalPos->NormalRect = *RestoreRect;
|
||||
}
|
||||
return(WindowObject->InternalPos);
|
||||
return(InternalPos);
|
||||
}
|
||||
|
||||
UINT
|
||||
@@ -270,7 +295,7 @@ WinPosGetMinMaxInfo(PWINDOW_OBJECT Window, POINT* MaxSize, POINT* MaxPos,
|
||||
MinMax.ptMaxSize.x += 2 * XInc;
|
||||
MinMax.ptMaxSize.y += 2 * YInc;
|
||||
|
||||
Pos = Window->InternalPos;
|
||||
Pos = NtUserGetProp(Window->Self, AtomInternalPos);
|
||||
if (Pos != NULL)
|
||||
{
|
||||
MinMax.ptMaxPosition = Pos->MaxPos;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: winsta.c,v 1.9 2002/09/08 10:23:52 chorns Exp $
|
||||
/* $Id: winsta.c,v 1.10 2002/09/17 23:43:28 dwelch Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
@@ -43,6 +43,8 @@ STATIC HDESK InputDesktopHandle = NULL;
|
||||
STATIC PDESKTOP_OBJECT InputDesktop = NULL;
|
||||
STATIC PWINSTATION_OBJECT InputWindowStation = NULL;
|
||||
|
||||
static HDC ScreenDeviceContext = NULL;
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
PDESKTOP_OBJECT
|
||||
@@ -836,6 +838,20 @@ NtUserSwitchDesktop(HDESK hDesktop)
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
VOID
|
||||
W32kInitializeDesktopGraphics(VOID)
|
||||
{
|
||||
ScreenDeviceContext = W32kCreateDC(L"DISPLAY", NULL, NULL, NULL);
|
||||
GDIOBJ_MarkObjectGlobal(ScreenDeviceContext);
|
||||
EnableMouse(ScreenDeviceContext);
|
||||
}
|
||||
|
||||
HDC
|
||||
W32kGetScreenDC(VOID)
|
||||
{
|
||||
return(ScreenDeviceContext);
|
||||
}
|
||||
|
||||
LRESULT CALLBACK
|
||||
W32kDesktopWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: dc.c,v 1.38 2002/09/08 10:23:52 chorns Exp $
|
||||
/* $Id: dc.c,v 1.39 2002/09/17 23:43:29 dwelch Exp $
|
||||
*
|
||||
* DC.C - Device context functions
|
||||
*
|
||||
@@ -311,6 +311,7 @@ HDC STDCALL W32kCreateDC(LPCWSTR Driver,
|
||||
W32kSetTextColor(hNewDC, RGB(0, 0, 0));
|
||||
W32kSetTextAlign(hNewDC, TA_BASELINE);
|
||||
DC_ReleasePtr( hNewDC );
|
||||
|
||||
return hNewDC;
|
||||
|
||||
Failure:
|
||||
@@ -1162,6 +1163,8 @@ HDC DC_AllocDC(LPCWSTR Driver)
|
||||
NewDC->w.xformVport2World = NewDC->w.xformWorld2Wnd;
|
||||
NewDC->w.vport2WorldValid = TRUE;
|
||||
|
||||
NewDC->w.hFont = W32kGetStockObject(SYSTEM_FONT);
|
||||
|
||||
GDIOBJ_UnlockObj( hDC, GO_DC_MAGIC );
|
||||
return hDC;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user