-
-
Notifications
You must be signed in to change notification settings - Fork 364
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore main window position using SetWindowPlacement()
In e579712, the code used to create the main window was updated to pass the saved window position directly to CreateWindow(). The problem with that is that CreateWindow() accepts the position in screen coordinates, while the window position is retrieved using GetWindowPlacement() and is therefore saved in workspace coordinates. Mixing these two coordinate systems meant that if the taskbar was in a different position, the window would move each time the application started. For example, if the taskbar was shown on the left of the screen, the window would move to the left each time the application was started, since workspace coordinates treated as screen coordinates would be further to the left. To fix this, the window position is now restored using SetWindowPlacement(). Additionally, there is no longer an explicit check to see whether the window is visible, since SetWindowPlacement() will adjust the coordinates if they would result in the window being completely off screen.
- Loading branch information
Showing
5 changed files
with
14 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters