Page MenuHome

Window manager: window size/position persistence
Needs ReviewPublic

Authored by Andrew Williams (sobakasu) on Feb 12 2019, 12:04 AM.



from D4291, this code saves window positions, sizes, and state (maximised/normal) to disk.

keeping the window positions/sizes saved separately from the blend file was a deliberate choice.

Note that functions that read and write to the wmWindowSize structure are in D4291, this code just reads and writes them to disk.

Diff Detail

rB Blender

Event Timeline

Campbell Barton (campbellbarton) requested changes to this revision.Feb 15 2019, 8:43 AM

Seems reasonable, I don't have a strong opinion on this, but storing window locations in a text file seems fine, as we do for bookmarks.

The patch isn't complete though.


Could do some sanity checks here that the rectangle is a usable window size.


This function isn't available in master, could this patch become self contained.

This revision now requires changes to proceed.Feb 15 2019, 8:43 AM
Andrew Williams (sobakasu) edited the summary of this revision. (Show Details)
  • Updated diff so that it can be applied to master separately from D4291
  • Added sanity checks on window size when reading/writing window position preferences
Andrew Williams (sobakasu) marked 2 inline comments as done.Feb 17 2019, 2:10 AM