Calculating the bottom-left coordinate from the top-left also requires the size. This required using frame as our normal "source of truth" for anything related to the position, so that property was added.
The downside of this change is that you can no longer set only the position atomically (you must set the entire frame at once). I can't imagine any use case for needing to do this, but that could be a lack of imagination on my part.
On the other hand, I can imagine a use case for atomically changing the size. Say in a tiling window manager, when a window is being moved around the screen, you want to resize it to the tile it is about to snap to, without disrupting the drag that is currently happening. This will continue to be supported.
Since Window.position is now pretty useless compared to Window.frame, it should probably be removed.
Sigh.. this might depend on #16, because I have to calculate the bottom-left coordinate, which requires having the position and size in the same place.
Fixes #24. Closes #16.
Calculating the bottom-left coordinate from the top-left also requires the size. This required using
frame
as our normal "source of truth" for anything related to the position, so that property was added.The downside of this change is that you can no longer set only the position atomically (you must set the entire frame at once). I can't imagine any use case for needing to do this, but that could be a lack of imagination on my part.
On the other hand, I can imagine a use case for atomically changing the size. Say in a tiling window manager, when a window is being moved around the screen, you want to resize it to the tile it is about to snap to, without disrupting the drag that is currently happening. This will continue to be supported.
Since
Window.position
is now pretty useless compared toWindow.frame
, it should probably be removed.