[racket] Second display monitor issue

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sat May 26 10:18:39 EDT 2012

Thanks! I've pushed a change that should solve the problem; let me know
if it still doesn't work.

At Sat, 26 May 2012 05:45:52 -0600, Kieron Hardy wrote:
> So it seems that for some reason (Older Dell laptop, ATI video, Windows 7
> using generic drivers) the Windows system call to return the list of
> monitors is returning them to Racket in a different order (primary display
> monitor last) than expected (primary display monitor first).
> 
> The code for get-all-screen-rects (in
> collects/mred/private/wx/win32/frame.rkt) assumes monitor 0 is the primary
> display monitor and is the first item in the list returned by
> EnumDisplayDevices. My tests show that at least sometimes the primary
> display monitor is not the first item in the list (also noted on SO at
> http://stackoverflow.com/questions/2600255/how-can-i-retrieve-monitor-information
> ).
> 
> An alternative solution to getting monitor information would be to use
> GetMonitorInfo passing a MONITORINFO or MONITORINFOEX structure for each of
> the values in the range 0 .. GetSystemMetrics (SM_CMONITORS) and used in
> Racket perhaps sorted by the monitor name returned in the szDevice field of
> the MONITORINFOEX structure.
> 
> If Racket needs to designate monitor 0 as the primary monitor then
> get-all-screen-rects must enumerate the display monitors and then perform
> some processing to sort them so that the primary monitor is returned as the
> first item in the list.
> 
> Cheers,
> 
> Kieron.
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users

Posted on the users mailing list.