Without this fix, a platform window could be resized by clicking just under the menu bar and dragging downwards, even that platform windows are supposed to be the size of the browser window by definition.
Without this fix, the presence of a modal ancestor window to a token field would lock down the autocomplete menu from mouse interaction.
This fix ensures the token field autocomplete menu accepts mouse events even during the presence of modal widows, just like other auxiliary windows such as pop up menus.
Without this fix, opening a transient popover would allow windows other than the modal window (or its children) to be interacted with.
In general, setCallback:forNextEventMatchingMask: did not work right if more than 1 callback was installed.
In the popover case the modal window would install its "any event" callback to control the event loop, but then the popover would add a second callback for mouse down to detect clicks outside of it. This would disrupt the modal event handling and allow mouse clicks (and presumably other events) to escape the modal event catcher.
This fix makes multiple nextEvent callbacks work as one would expect, with later ones taking priority over older ones and reinserted callbacks remaining at a stable priority.
This allows the modal window callback to be at the "bottom" of the handler stack and the popover event handler to be "on top" of that, and to remain that way. In theory more layers of event handling could be layered on top such as 2 simultaneous popovers.
This fix also fixes the dequeue argument in forNextEvent callbacks.
Without this fix, a transient popover would close if the autocomplete menu of a token field contained in it was clicked.
This happened because the popover considered the click to be on a different window. Although not tested, it's likely the same thing would happen if the menu of a combo pop or a pop up button was clicked.
This fix makes it so that any child window of a popover can be clicked without the popover closing.
New: use dedicated class instead of CPString for selection markers
Previously, selection markers were strings, which allowed the possibility that user data could be mistaken for a selection marker.
With this commit, selection markers are global instances of a private class, removing the possibility of clashes with user data.
Fixed: views from other windows cannot be next/previous key views
Previously, a view from another window could be set as the next/previous key view, which would result in unexpected behavior, including an infinite loop.
This commit ensures the proposed next/previous view belongs to the same window as the view to which it will be chained.
Added documentation for tableView:dataViewForTableColum:row: delegate method. Document other cases, when we expect the data view to have a CPViewNotSizable mask.
ViewBasedCib example: added variable row heights.
Without this fix, CPView's resizeWithOldSuperviewSize: would simply resize subviews at the rate of 1 pixel for every 2 pixel change.
This change introduces a new method of resizing views to a ratio of the size of the superview.
Patch contributed by @davidkhess
Previously, if CPApplication -targetForAction:to:from: returned nil, no check was done to see if that failed because there was no action or no valid target. If the item had no item, no target, and to action binding, it would be left enabled, which was incorrect.
This commit fixes the validation to disable the item if targetForAction:to:from: returns nil and the item has an action or target.