SOLVESPACE -- parametric 2d/3d CAD
Examples
Tutorials
Features
Download
Reference
Technology
Library
Forum
Contact
USER FORUM

(you are viewing a thread; or go back to list of threads)

Doesn't remember window position on 2nd monitor (by Dale Wheat)
SolveSpace remembers the position and sizing of the two user interface windows between runs. This fails when I use a 2nd monitor attached to the VGA port of my laptop. If I size everything the way I like it on the 2nd (larger) monitor, then exit SolveSpace, when I re-start the application it shows smallish windows overlapped in the upper left corner of the main monitor, and I have to reposition the windows again.
Mon Mar 9 2015, 14:53:52
(no subject) (by Rune)
Got the same issue, but don't see it as a problem.
Tue Mar 10 2015, 07:49:20
(no subject) (by Dale Wheat)
@Rune:

I would assume that your monitors are the same size. :D

I work using a laptop with a larger, secondary monitor for CAD work. Having to resize the SolveSpace windows every time I open the program is an issue. The software mechanism for remembering the layout is already in place. It just needs to be tested and corrected for a single usage case.
Tue Mar 10 2015, 09:57:56
(no subject) (by yugami)
The current code is not multi monitor friendly due to the use of GetWindowRect(GetDesktopWindow())

I do not currently have multiple monitors but I'm reasonably sure that this updated file should patch the issue.

I pull the monitor information from the saved rectangle position then the code runs as normal.
Tue Mar 10 2015, 22:56:43, download attachment freeze.cpp
(no subject) (by Dale Wheat)
Your patch works. Thank you.

One case remains unhandled:

1. Position windows on 2nd monitor.
2. Exit application
3. Disconnect second monitor.
4. Re-start application.

The application starts with the unreasonably small default windows.

It does, however, gracefully handle the situation where the application is being displayed on the 2nd monitor and the 2nd monitor is disconnected while the application is still running, i.e., moves the windows to the primary monitor in appropriate sizes. Bravo!
Thu Mar 12 2015, 10:56:45
(no subject) (by yugami)
The patch has been integrated into the main source.

I did not modify any of the error handling logic which resizes the window in an attempt to get it on screen.
Thu Mar 12 2015, 13:20:34
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):
© 2008-2018 SolveSpace contributors. Most recent update Nov 22 2018.