Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

Improve semi-transient behaviour #95

Merged
merged 2 commits into from
Jul 9, 2013
Merged

Conversation

dannygreg
Copy link

This fixes the case of first-clicks closing semi-transient popovers.

@ghost ghost assigned joshaber Jul 9, 2013
@@ -255,7 +259,9 @@ - (void)showRelativeToRect:(CGRect)positioningRect ofView:(NSView *)positioningV
if (strongSelf.behavior == RBLPopoverBehaviorTransient) {
shouldClose = !mouseInPopoverWindow;
} else {
shouldClose = strongSelf.popoverWindow.parentWindow.isKeyWindow && NSPointInRect(NSEvent.mouseLocation, strongSelf.popoverWindow.parentWindow.frame) && !mouseInPopoverWindow;
shouldClose = strongSelf.popoverWindow.parentWindow.isKeyWindow && NSPointInRect(NSEvent.mouseLocation, strongSelf.popoverWindow.parentWindow.frame) && !mouseInPopoverWindow && !self.parentWindowResignedKey;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/self/strongSelf

@joshaber
Copy link
Contributor

joshaber commented Jul 9, 2013

Oh yeah... 🚎

@dannygreg
Copy link
Author

🍍

@joshaber
Copy link
Contributor

joshaber commented Jul 9, 2013

🆒

joshaber added a commit that referenced this pull request Jul 9, 2013
@joshaber joshaber merged commit f3a1b58 into master Jul 9, 2013
@joshaber joshaber deleted the fix-popover-transient-behaviour branch July 9, 2013 04:09
@mdiep
Copy link
Contributor

mdiep commented Feb 17, 2014

I don't understand the intent of this change. 😕

From the docs, it sounds like clicking in the main window should closing the popover. This change seems to require 2 clicks. Can you help me understand what the intent was here?

@dannygreg
Copy link
Author

This was to match NSPopover's behaviour. Create a test project with an NSPopover vs a RBLPopover and compare before and after this change.

@jspahrsummers
Copy link
Contributor

And then drop it into the repo so we can close out #17. :trollface:

@mdiep
Copy link
Contributor

mdiep commented Feb 24, 2014

I made a test app in #123. From my testing, it looks like this change breaks the behavior. Maybe there was an NSPopover bug in 10.7 or 10.8 that you were testing against?

@dannygreg
Copy link
Author

Possibly? If something doesn't match what NSPopover is doing then it's wrong.

mdiep added a commit that referenced this pull request Mar 5, 2014
@mdiep mdiep mentioned this pull request Mar 5, 2014
dannygreg pushed a commit that referenced this pull request Mar 13, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants