[ros-diffs] [janderwald] 33613: - monitor device name start with "\\.\\DISPLAY<number>" than with "\\??\\DISPLAY<number>" - implement handling MONITOR_DEFAULTTOPRIMARY in IntGetMonitorsFromRect - implement handling MONITOR_DEFAULTTONULL in NtUserMonitorFromWIndow - ReactOS now passes all user32_winetest monitor tests
janderwald at svn.reactos.org
janderwald at svn.reactos.org
Tue May 20 17:20:29 CEST 2008
Author: janderwald
Date: Tue May 20 10:20:28 2008
New Revision: 33613
URL: http://svn.reactos.org/svn/reactos?rev=33613&view=rev
Log:
- monitor device name start with "\\.\\DISPLAY<number>" than with "\\??\\DISPLAY<number>"
- implement handling MONITOR_DEFAULTTOPRIMARY in IntGetMonitorsFromRect
- implement handling MONITOR_DEFAULTTONULL in NtUserMonitorFromWIndow
- ReactOS now passes all user32_winetest monitor tests
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c?rev=33613&r1=33612&r2=33613&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/monitor.c [iso-8859-1] Tue May 20 10:20:28 2008
@@ -174,7 +174,7 @@
return STATUS_INSUFFICIENT_RESOURCES;
}
- _snwprintf(Buffer, CCHDEVICENAME, L"\\??\\DISPLAY%d", DisplayNumber + 1);
+ _snwprintf(Buffer, CCHDEVICENAME, L"\\\\.\\DISPLAY%d", DisplayNumber + 1);
if (!RtlCreateUnicodeString(&Monitor->DeviceName, Buffer))
{
DPRINT("Couldn't duplicate monitor name!\n");
@@ -322,7 +322,7 @@
OPTIONAL IN DWORD listSize,
OPTIONAL IN DWORD flags)
{
- PMONITOR_OBJECT Monitor, NearestMonitor = NULL;
+ PMONITOR_OBJECT Monitor, NearestMonitor = NULL, PrimaryMonitor = NULL;
UINT iCount = 0;
LONG iNearestDistanceX = 0x7fffffff, iNearestDistanceY = 0x7fffffff;
@@ -384,6 +384,11 @@
IntersectionRect = MonitorRect;
}
+ if (flags == MONITOR_DEFAULTTOPRIMARY && Monitor->IsPrimary)
+ {
+ PrimaryMonitor = Monitor;
+ }
+
if (iCount < listSize)
{
if (hMonitorList != NULL)
@@ -403,7 +408,15 @@
}
iCount++;
}
-
+ else if (iCount == 0 && flags == MONITOR_DEFAULTTOPRIMARY)
+ {
+ if (iCount < listSize)
+ {
+ if (hMonitorList != NULL)
+ hMonitorList[iCount] = PrimaryMonitor->Handle;
+ }
+ iCount++;
+ }
return iCount;
}
@@ -878,7 +891,12 @@
if (!(Window = UserGetWindowObject(hWnd)))
{
- RETURN(NULL);
+ if (dwFlags == MONITOR_DEFAULTTONULL)
+ {
+ RETURN(hMonitor);
+ }
+ IntGetMonitorsFromRect(NULL, &hMonitor, NULL, 1, dwFlags);
+ RETURN(hMonitor);
}
Rect.left = Rect.right = Window->Wnd->WindowRect.left;
More information about the Ros-diffs
mailing list