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

macbook pro notch obscures terminal in simple fullscreen mode #5612

Closed
dannydulai opened this issue Nov 16, 2021 · 10 comments
Closed

macbook pro notch obscures terminal in simple fullscreen mode #5612

dannydulai opened this issue Nov 16, 2021 · 10 comments

Comments

@dannydulai
Copy link
Contributor

I'm running alacritty 0.10.0-dev (e648aae) on the latest macbook pro with the notch, and when entering simple fullscreen mode, the notch obscures the top of the terminal. The simple fullscreen mode is awesome, and it'd be awesome to avoid this "notch" issue.

Is there an option or some way to put some padding at the top? or even show the macos menu bar?

@chrisduerr
Copy link
Member

There might be some way to resolve this without code changes, but I'm not an active macOS user.

As far as Alacritty is concerned I really don't care about implementing workarounds for Apple's poor hardware design.

@dannydulai
Copy link
Contributor Author

dannydulai commented Nov 17, 2021

Does that mean you will reject pull requests or just that you personally are not going to do anything to fix it? The Closing of this thread implies that you will not accept this type of change.

I didn't mean to put in a "bug fix" ticket to the core Alacritty team here. Apologies if that is what I have done. I am asking for any known workarounds and noting an issue that may not be apparent to those who know how to fix this easily because the hardware is recent.

It's also worth mentioning that while you may disagree with the notch, AppKit has had support for "safeAreaInsets" for a while now where the notch has been available, and it is also available on MacOS. Assuming that an app can safely get the full screen is no longer a safe assumption in 2021.

It's fine if you don't care about MacOS, but you, Joe, and others (including myself) have put a lot of care into Alacritty, including the MacOS support. I'd think we all want Alacritty to work great, including what is most likely to be the future of a huge number of developer-oriented laptops.

I don't mind taking a stab at this if you are willing to accept the change, but a discussion on the right way to tackle the problem would be most appreciated. Long ago, Joe helped me in the same way with a request I gave about cursor colors, which led to me issuing a pull request (that did get merged). The way I would have tackled it before his input was not the way he preferred it, and the discussion helped avoid that work.

For example, in the config, would you be ok with adding a "top" option under window -> padding and would you be willing to add a duplicate of padding that is distinct for simple full screen mode?

@chrisduerr
Copy link
Member

The Closing of this thread implies that you will not accept this type of change.

Correct, I will not accept any Pull Requests to Alacritty to work around Apple's poor hardware design.

@dannydulai
Copy link
Contributor Author

Ok, since you are being very opinionated on the poorness of Apple's hardware design, let's flip it. Will you accept a change that fixes alacritty's poor design that ignores AppKit's intended use of safe area intents?

@chrisduerr
Copy link
Member

I will not accept any patches directly related to this into Alacritty.

@dannydulai
Copy link
Contributor Author

Ok. I understand.

I've asked the glutin team on what the proper way to handle this is over here

rust-windowing/winit#2066

I've also found what iTerm2 does, and they've just added an exception for notched MacBooks:

https://gitlab.com/gnachman/iterm2/-/commit/f5c5f996b8f6ba318900b275b7048b5a97622444

I'll see what the glutin guys say is the right thing to do. It looks like iTerm2 just does what I asked about above (padding on top, with auto-population of padding field).

@Blackjacx
Copy link

An alternative would be to just enable the specification of the window padding like below which would be an advantage for all platforms and also other terminlal emulators do so:

[window]
padding = { top = 10, bottom = 10, leading = 0, trailing = 0 }

@nixpulvis
Copy link
Contributor

I’ll just add, not that I’ve found the time and energy to do it, but there has been discussion of supporting this. But it requires winit support for dead regions. It’s been a while since I looked at the issue over there about it. I could dig that up if it’s helpful.

chris is probably right, alacritty itself should need to think about this.

@dannydulai
Copy link
Contributor Author

@nixpulvis, winit support: rust-windowing/winit#3890

@nixpulvis
Copy link
Contributor

@chrisduerr would you consider reopening this issue since it seems we should be able to fix this without hacks in Alacritty soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants