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

[Bug]: browserwindow cannot be positioned over mac topbar (menubar) #42104

Closed
3 tasks done
tianjunnew opened this issue May 9, 2024 · 1 comment
Closed
3 tasks done
Labels

Comments

@tianjunnew
Copy link

Preflight Checklist

Electron Version

26.6.10

What operating system are you using?

macOS

Operating System Version

macOS Sonoma 14.4.1

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

if win.setAlwaysOnTop(true, 'screen-saver'), then win.setPosition / win.setBounds can position the window overlap the menubar without entering fullscreen mode

Actual Behavior

win.setPosition(0, 0) / win.setBounds({ x: 0, y: 0 }) cannot position the window overlap the menubar ( y is reset to the menubar's height), even if win.setAlwaysOnTop(true, 'screen-saver')

Testcase Gist URL

No response

Additional Information

No response

@codebytere
Copy link
Member

Unfortunately, the behavior you're observing is due to the way macOS handles window positioning. When you manually drag a window, macOS allows you to position it in a way that partially obscures the menu bar as long as it has a window level that enables that. However, programmatically setting a window's position respects the boundaries of the screen, excluding the menu bar. There's not really anything we can do about this.

@codebytere codebytere closed this as not planned Won't fix, can't repro, duplicate, stale May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants