Change Details

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.
New features:
- 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.
- updated getWindowBounds() and createWindow() methods so that when the dimensions returned by getWindowBounds() are used in subsequent createWindow() calls, it creates a window in the same size and position.
- 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.

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.
New features:
- 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.
- updated getWindowBounds() and createWindow() methods so that when the dimensions returned by getWindowBounds() are used in subsequent createWindow() calls, it creates a window in the same size and position.
- 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.

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.
New features:
- 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.
- updated getWindowBounds() and createWindow() methods so that when the dimensions returned by getWindowBounds() are used in subsequent createWindow() calls, it creates a window in the same size and position.
- 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.