github/Rebel — pull request #125 by mdiep (2014-03-05 18:37:20+00:00)
Title: Revert #95

I think this gets us closer to the right behavior for `RBLPopover`. Play around with the demo app to get a feel for the behavior.

There are still compatibility issues, which may be insurmountable:

0. When an `NSPopover` is on screen, its parent window remains key (and thus appears active). When a `RBLPopover` is on screen, it takes over key status. I can't figure out how to make `RBLPopover` work like `NSPopover`. I expect the logic for `NSPopover` is sprinkled through AppKit and is tightly coupled.

0. When a semi-transient `NSPopover` is on-screen, clicking on a button in the parent window will dismiss the popover. This is done inside `-[NSApplication nextEventMatchingMask…]` because buttons have their own tracking loop. The `NSEvent` monitors that `RBLPopover` uses don't fire in this case, so `RBLPopover`s don't dismiss.

So there are still inconsistencies, but I think this gets us closer. I'm guessing #95 was done to work around a consistency issue related to the key status of the popover and parent window.