mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-01 00:13:37 +00:00
Afterbbfaac5, all kinds of strange behavior occurred with window sizing and moving due to overzealous constraining. Cocoa does not constrain the frame of hidden windows. When a hidden window is ordered in, it is constrained to the usable screen content rect. A visible window has its height constrained when its frame is set. Its origin is constrained such that a minimum margin at the left, right and top is visible, and the top is constrained to be below the menu bar. This commit fixes a number of problems related to window moving and resizing that were introduced bybbfaac5: - Sheets are not constrained at all. - Moving a window does not constrain its size. In addition, when a window is moved, tracking is relative to the initial click point, which provides proper behavior when the movement is constrained and the mouse keeps moving.