Commit a8e755e
Fix Settings window going off-screen after disconnecting 4K monitor
- Fix IsPositionValid to use SystemParameters.VirtualScreen* (DIP units)
instead of MonitorInfo.WorkingArea (physical pixels) to avoid DPI
coordinate mismatch on high-DPI and mixed-DPI multi-monitor setups.
- Fix AdjustWindowPosition and SetWindowPosition to correctly calculate
the max boundary as VirtualScreenTop + VirtualScreenHeight - ActualHeight
(was VirtualScreenHeight - ActualHeight), which incorrectly allowed
windows to extend beyond the bottom/right edge when VirtualScreenTop
or VirtualScreenLeft were non-zero (e.g., monitors above/left of primary).
Co-authored-by: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com>1 parent 8d042d2 commit a8e755e
1 file changed
Lines changed: 11 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
183 | | - | |
| 182 | + | |
| 183 | + | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
195 | | - | |
| 194 | + | |
| 195 | + | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
211 | 207 | | |
212 | 208 | | |
213 | 209 | | |
| |||
0 commit comments