-
Notifications
You must be signed in to change notification settings - Fork 15.2k
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
hiddenInset and vibrancy cause a invisible/low-alpha titlebar on 10.13 #10521
Comments
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. To help make it easier for us to investigate your issue, please follow the contributing guidelines. |
I think we may want to explicitly set titlebarAppearsTransparent to NO in this case? |
@gerges I get the same warning here, digging in the code now and my eye spotted this: https://github.com/electron/electron/blob/1-7-x/atom/browser/native_window_mac.mm#L922 So my guess is that adding something like this at line 895 would fix it: // Explicitely don't make titlebar transparent by default
if (base::mac::isAtLeastOS10_10()) {
[window_ setTitlebarAppearsTransparent:NO];
} But I don't know, never touched Objective C / Xcode before so don't look at me 😆 Attempting to build the 1.7.x branch now with my change to see if it works. Same issue with Electron 1.6.9 (which Atom uses currently) by the way. Update: Alright it takes me took long to build (or to figure out how to) as I need to install the 10.10 SDK from Xcode 6.3 first to get it to build as far as I know. So if someone with a bootstrapped environment could test this, that would be awesome. |
It seems like the reason is not related to UpdateAfter digging up deeper with the electron implementation as well as playing with the native swift code with Xcode, I found that the To be specific: electron/atom/browser/native_window_mac.mm Lines 1666 to 1717 in 68d35db
You will be able to let the vibrancy effect cover the titlebar area by changing if (effect_view == nil) {
effect_view = [[[NSVisualEffectView alloc]
initWithFrame: [[[window_ contentView] superview] bounds]] autorelease];
[window_ setVibrantView:(NSView*)effect_view];
[effect_view setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
[effect_view setBlendingMode:NSVisualEffectBlendingModeBehindWindow];
[effect_view setState:NSVisualEffectStateActive];
[[[window_ contentView] superview] addSubview:effect_view
positioned:NSWindowBelow
relativeTo:nil];
} But by doing this will cause the app to terminate after seconds of running as it conflicts with apple's policy to not attach a view directly to |
Some good news and bad news: I also found that the |
Making good progress there @gnattu, thank you so much! |
@gnattu Finally someone that looks into this. Thank you. |
@gnattu I've also looked at the code but you seem to have dug deeper already so I'll put my hopes on you for this :). I noticed that toggling fullscreen once seems to solve both the transparent titleBar and rounded corners issues. I hope this hint helps you. Thanks -- Update -- I also don't see the overlapping traffic lights issue. Running macOS 10.13.1 |
@ImJCabus Are you saying the issue has been resolved in 10.13.1? |
@sallar No. The issue is still there. However, toggling fullscreen (green traffic lights icon) once resolves it. |
@ImJCabus I can confirm this works with Atom 👍 Glad you found a workaround until it's fixed. |
@ImJCabus Your workaround doesn't work for me, unfortunately. |
@ImJCabus yes, this works in principle.
|
@sbward Hmm. I haven't looked into this for a while now. Maybe electron had an update that killed the "workaround"? |
any update on this? still experiencing transparent bar in macOS 10.13.2 |
@ImJCabus though I haven tried. I suppose if you're on a deadline and need to deliver you can always implement a look-a-like toolbar and set the real toolbar as hidden. |
Anyone... Bueler... |
Adding |
Surprised this bug isn't higher priority for a fix considering it makes both frameless and vibrant windows unusable on macOS and affects a bunch of atom themes 😔 |
I know it's not a lot but I added a $300 bounty to the issue if it helps anyone find the time to have a go at fixing this. 😄 |
Proposed fix is up 👍 #11886 |
Expected behavior
Title bar should not be invisible
Actual behavior
Title bar is invisible
How to reproduce
The text was updated successfully, but these errors were encountered: