the first patch splits out window placement into proc so plugins can easily override it. This makes it easy for people to customize these calculations based on
their Window Manager, desires, etc.
The second patch gets the size of the full desktop area rather than just the screen size. For setups with multiple screens, these will be different. The 'winfo screenwidth' will be the width of the main screen while 'wm maxsize' gives the maximum possible size of a window, which includes all screens.