Commit b924e5c
Restore window geometry correctly, even in high DPI
The coordinates returned by GetWindowPlacement() must be passed to
SetWindowPlacement() and not SetWindowPos() as the former functions
account correctly for non-standard DPI, while the latter one does not.
Using SetWindowPlacement() also allows to remove the checks for the
coordinates being valid because the function already checks for this and
will always position the window inside the visible area anyhow.
Fixes #370.1 parent fd80e5c commit b924e5c
1 file changed
+16
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
682 | 682 | | |
683 | 683 | | |
684 | 684 | | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
691 | 701 | | |
692 | 702 | | |
693 | 703 | | |
| |||
0 commit comments