-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Workaround for dimmed HDR content in full screen on macOS 13, #3844 #4031
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
Conversation
This workaround also addresses another macOS Ventura regression where an external monitor goes black, #4015. This same dimming problem was reported in issues #3880, #4013 and #4014. The workaround changes the windowDidLoad method of MainWindowController such that when running under macOS Ventura it will add a tiny subview with such a low alpha level it is invisible to the human eye. Issue #4015 has been reproduced without IINA, so we are certain this is a regression in macOS 13. At this time we do not know the root cause and can not explain why this workaround works.
iina/MainWindowController.swift
Outdated
@@ -550,6 +550,19 @@ class MainWindowController: PlayerWindowController { | |||
// gesture recognizer | |||
cv.addGestureRecognizer(magnificationGestureRecognizer) | |||
|
|||
// Workaround a bug in macOS Ventura where HDR content becomes dimmed when playing in full |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Workaround a bug in macOS Ventura where HDR content becomes dimmed when playing in full | |
// Work around a bug in macOS Ventura where HDR content becomes dimmed when playing in full |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed typo.
iina/MainWindowController.swift
Outdated
// screen mode once overlaying views are fully hidden (issue #3844). After applying this | ||
// workaround another bug in Ventura where an external monitor goes black could not be | ||
// reproduced (issue #4015). The workaround adds a tiny subview with such a low alpha level it | ||
// is invisible to the human eye. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like a short comment mentioning that this workaround isn't perfect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added note that it might not be effective in all cases.
Hopefully this can be merged soon. Glad I could help 🙂 |
This workaround also addresses another macOS Ventura regression where an external monitor goes black, #4015. This same dimming problem was reported in issues #3880, #4013 and #4014. The workaround changes the windowDidLoad method of MainWindowController such that when running under macOS Ventura it will add a tiny subview with such a low alpha level it is invisible to the human eye. Issue #4015 has been reproduced without IINA, so we are certain this is a regression in macOS 13. At this time we do not know the root cause and can not explain why this workaround works. This workaround may not be effective in all cases.
@uiryuu Please confirm that it works on your machine, then you can merge it. |
Is there a more elegant solution? IMO this workaround sucks. |
@ownia I'm pretty certain all of us agree with your assessment of this fix. With this workaround in place I was unable to reproduce issue #4015. That problem has been reproduced just using Firefox. This indicates the regression in macOS Ventura is not tied to something special about IINA. Both the dimming problem and the black screen problem occur when IINA is in full screen mode and not showing the on screen controller. At least we think that behavior is consistent. We do not know the root cause of the problem in Ventura. We can not explain why the problem does not occur when the change in this PR in place other than we are making it seem like the OSC is always being displayed to avoid one of the conditions we think are required to trigger the macOS 13 regression. The term for this kind of fix is hackaround. Any additional information concerning this problem or suggestions for alternative workarounds welcome. |
This workaround also addresses another macOS Ventura regression where an external monitor goes black, #4015.
This same dimming problem was reported in issues #3880, #4013 and #4014.
The workaround changes the windowDidLoad method of MainWindowController such that when running under macOS Ventura it will add a tiny subview with such a low alpha level it is invisible to the human eye.
Issue #4015 has been reproduced without IINA, so we are certain this is a regression in macOS 13. At this time we do not know the root cause and can not explain why this workaround works.
Description:
Starting with macOS 13, some strange behavior can be seen when viewing videos in full screen in HDR mode. The screen will be dimmed when the player controls disappear. This workaround adds a tiny invisible subview when running under macOS 13 so that there is always more than one "visible" view in the window.
Many thanks to @royj who came up with the original workaround. This PR addresses feedback from reviewers.