Thanks Matthew for the fix - it seems to work fine - and wow done so quickly too!<br><br>Is there a reason you have Windows enumerate the display monitors (with EnumDisplayMonitors) and then ask Windows for details for each of those monitors (with GetMonitorInfoW)? I am thinking that a more direct approach would be to have some sort of in-range step through the monitors in turn directly and collecting and processing the data that way. I am probably missing something but the enumerate-first approach seems to be doing more work than strictly necessary. Admittedly it's a terribly minor quibble, it's only a tiny bit more work, what with the small number of monitors and the small number of times this needs to be done, am just looking for greater understanding.<br>
<br>Cheers,<br><br>Kieron.<br><br><div class="gmail_quote">On Sat, May 26, 2012 at 8:18 AM, Matthew Flatt <span dir="ltr"><<a href="mailto:mflatt@cs.utah.edu" target="_blank">mflatt@cs.utah.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks! I've pushed a change that should solve the problem; let me know<br>
if it still doesn't work.<br>
<div class="HOEnZb"><div class="h5"><br>
At Sat, 26 May 2012 05:45:52 -0600, Kieron Hardy wrote:<br>
> So it seems that for some reason (Older Dell laptop, ATI video, Windows 7<br>
> using generic drivers) the Windows system call to return the list of<br>
> monitors is returning them to Racket in a different order (primary display<br>
> monitor last) than expected (primary display monitor first).<br>
><br>
> The code for get-all-screen-rects (in<br>
> collects/mred/private/wx/win32/frame.rkt) assumes monitor 0 is the primary<br>
> display monitor and is the first item in the list returned by<br>
> EnumDisplayDevices. My tests show that at least sometimes the primary<br>
> display monitor is not the first item in the list (also noted on SO at<br>
> <a href="http://stackoverflow.com/questions/2600255/how-can-i-retrieve-monitor-information" target="_blank">http://stackoverflow.com/questions/2600255/how-can-i-retrieve-monitor-information</a><br>
> ).<br>
><br>
> An alternative solution to getting monitor information would be to use<br>
> GetMonitorInfo passing a MONITORINFO or MONITORINFOEX structure for each of<br>
> the values in the range 0 .. GetSystemMetrics (SM_CMONITORS) and used in<br>
> Racket perhaps sorted by the monitor name returned in the szDevice field of<br>
> the MONITORINFOEX structure.<br>
><br>
> If Racket needs to designate monitor 0 as the primary monitor then<br>
> get-all-screen-rects must enumerate the display monitors and then perform<br>
> some processing to sort them so that the primary monitor is returned as the<br>
> first item in the list.<br>
><br>
> Cheers,<br>
><br>
> Kieron.<br>
</div></div><div class="HOEnZb"><div class="h5">> ____________________<br>
> Racket Users list:<br>
> <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
</div></div></blockquote></div><br>