It seems like blender always opens windows like preferences in the top left corner of the screen. And then I immediately have to move it manually to the center of the screen before I start using it due to OCD.
- by default, windows open in the center of the main display.
- window positions and state (maximized/minimized) are saved when they are closed.
- when opening a window, previous position and state is used.
- if there is no previous position or state information, defaults are used.
- windows are constrained to opening within a physical display. otherwise, defaults are used. (command line positions currently override this)
- for "temp" windows, one of each type can be open at once (render, preferences) - not sure if this will break anything
Overview of code changes:
- added GHOST_GetDisplayDimensions() to support multiple displays
- drastic changes to GHOST_WindowWin32.cpp, removed a lot of code that was converting from client bounds to window bounds. it now just uses the bounds given. this makes it easy to save and restore window positions, because wm_window.c can simply save the window bounds and then pass it to createWindow next time.
- removed x, y parameters from WM_window_open_temp(). the user preferred position (the last position a window was closed in) is now used, or the window is positioned centrally in its parent.
- added ghost_rect to wmWindow struct. this is used instead of the client data posx, posy, sizex, sizey when creating new windows.
- added type to wmWindow and a WM_WINDOW_MAIN type, previously these types were only used for "temp" windows
- added save/restore code to wm_files to persist window positions to disk.