Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BrowserView: Allow dragging of window to screen above menubar #10661

Merged
merged 2 commits into from
Oct 3, 2017

Conversation

felixrieseberg
Copy link
Member

When implementing the BrowserView drag behavior, I was clever and added logic to prevent the window from being dragged underneath the menubar. Downside: If there's a screen above the menubar, users won't be able to drag the window there.

This code change is only relevant when Electron is built with an SDK < 10.11 (which Electron currently does, sadly). If built with >= 10.11, you'll get native drag behavior. Below, you'll get this fix: It'll check if there's a screen above the menubar, and if so, allow dragging it there.

If you're wondering why all of this is necessary: The BrowserView is above everything else, including all the layers that NSApplication and NSWindow add to our window.

Copy link
Contributor

@poiru poiru left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this! I thought I already reviewed this, guess I never submitted it... Sorry for the delay.

@felixrieseberg
Copy link
Member Author

@poiru No, thank you!

@felixrieseberg felixrieseberg merged commit 4e05d24 into master Oct 3, 2017
@felixrieseberg felixrieseberg deleted the browserview-multiple-screens branch October 3, 2017 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants