<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Bernhard,</p>
<br>
<div class="moz-cite-prefix">On 28/09/2018 23:08, Bernhard Übelacker
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:20180928210802.2631-1-bernhardu@mailbox.org">
<div class="moz-text-plain" wrap="true" graphical-quote="true"
style="font-family: -moz-fixed; font-size: 12px;"
lang="x-unicode">
<pre wrap="">Wine-Bug: <a class="moz-txt-link-freetext" href="https://bugs.winehq.org/show_bug.cgi?id=43187" moz-do-not-send="true">https://bugs.winehq.org/show_bug.cgi?id=43187</a>
Signed-off-by: Bernhard Übelacker <a class="moz-txt-link-rfc2396E" href="mailto:bernhardu@mailbox.org" moz-do-not-send="true"><bernhardu@mailbox.org></a>
---
Supersedes patch 151898.
v2: No changes to v1.
---
dlls/user32/driver.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/driver.c b/dlls/user32/driver.c
index 561a126bd6..03296d518c 100644
--- a/dlls/user32/driver.c
+++ b/dlls/user32/driver.c
@@ -354,7 +354,12 @@ static LONG CDECL nulldrv_ChangeDisplaySettingsEx( LPCWSTR name, LPDEVMODEW mode
static BOOL CDECL nulldrv_EnumDisplayMonitors( HDC hdc, LPRECT rect, MONITORENUMPROC proc, LPARAM lp )
{
- return FALSE;
+ RECT r = {0, 0, 640, 480};
+
+ TRACE("(%p, %p, %p, 0x%lx)\n", hdc, rect, proc, lp);
+
+ proc(NULL, hdc, &r, lp);
+ return TRUE;
}</pre>
</div>
</blockquote>
<br>
NULL doesn't seem to be a good choice for monitor handle here. It's
probably worth testing.<br>
<br>
<blockquote type="cite"
cite="mid:20180928210802.2631-1-bernhardu@mailbox.org">
<div class="moz-text-plain" wrap="true" graphical-quote="true"
style="font-family: -moz-fixed; font-size: 12px;"
lang="x-unicode">
<pre wrap="">
static BOOL CDECL nulldrv_EnumDisplaySettingsEx( LPCWSTR name, DWORD num, LPDEVMODEW mode, DWORD flags )
@@ -364,7 +369,17 @@ static BOOL CDECL nulldrv_EnumDisplaySettingsEx( LPCWSTR name, DWORD num, LPDEVM
static BOOL CDECL nulldrv_GetMonitorInfo( HMONITOR handle, LPMONITORINFO info )
{
- return FALSE;
+ RECT r = {0, 0, 640, 480};
+ const WCHAR device[] = {'W','i','n','D','i','s','c',0};</pre>
</div>
</blockquote>
<br>
It should be static const.<br>
<br>
<blockquote type="cite"
cite="mid:20180928210802.2631-1-bernhardu@mailbox.org">
<div class="moz-text-plain" wrap="true" graphical-quote="true"
style="font-family: -moz-fixed; font-size: 12px;"
lang="x-unicode">
<pre wrap="">
+
+ TRACE("(%p, %p)\n", handle, info);
+
+ info->rcMonitor = r;
+ info->rcWork = r;
+ info->dwFlags = MONITORINFOF_PRIMARY;
+ if (info->cbSize >= sizeof(MONITORINFOEXW))
+ lstrcpyW( ((MONITORINFOEXW *)info)->szDevice, device );
+ return TRUE;
}
</pre>
</div>
</blockquote>
<br>
Monitor handle is not used, so maybe it's not too important, but we
should probably validate it anyway.<br>
<br>
Thanks,<br>
Jacek<br>
</body>
</html>