Commit 74eff25
[wsi] Check more display mode flags when comparing them.
EnumDisplaySettings(..., ENUM_CURRENT_SETTINGS, ...) is guaranteed to have DM_DISPLAYORIENTATION,
DM_BITSPERPEL, DM_PELSWIDTH, DM_PELSHEIGHT, DM_DISPLAYFLAGS, DM_DISPLAYFREQUENCY, and DM_POSITION.
If we don't compare positions, then in Win32WsiDriver::restoreDisplayMode(), the original monitor
layout might not be restored. For example, a secondary 1080p monitor at (3840, 0) can be moved to
(1280, -1080) after the primary 4K monitor resolution changes to 720p and back to 4K. And due to the
secondary monitor having the same resolution, its position won't be restored before this patch.
Fix Rime (493200) fails to switch monitors in borderless mode in some cases for Proton 10 alpha.
Related to #2064.1 parent 29f33f0 commit 74eff25
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
51 | 57 | | |
52 | 58 | | |
53 | 59 | | |
| |||
0 commit comments