
Resolution changes are ignored
Posted Tuesday, 19 October, 2010 - 09:37 by jdomnitz| Project: | The Open Toolkit library |
| Version: | 1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | in progress |
Jump to:
Description
If the screen resolution changes...OpenTK ignores this change and maintains the incorrect DisplayDevice struct. This struct should be updated when a resolution changes.


Comments
#1
This is now implemented on Windows (trunk, r2969).
#2
Is this tested? I was under the impression Microsoft.Win32.SystemEvents.DisplaySettingsChanged is only fired when used with winforms. I haven't tested this code yet (have quite a few changes to get it all implemented in my application) but when I implemented this I couldn't get it to fire under win7 for screen resolution changes and ended up just listening for WM_DISPLAYCHANGE.
#3
Microsoft.Win32.SystemEvents.DisplaySettingsChanged is in System.dll, so it should be independent of winforms. Some quick testing showed that it fires after a resolution change (WinXP virtual machine) but fails to fire on Linux.
#4
Can you test it in Vista or win7? Those implement the new display system and may function differently.
For Linux you will want to listen for the RRScreenChangeNotify event.
See here:
http://keithp.com/~keithp/talks/randr/protocol.txt