-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Rectify timeline in Touchbar freezes, #4058 #4087
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? 8000 Sign in to your account
Conversation
This commit will: - Add a new method makeTouchBar to PlayerCore - Change MainWindowController and MiniPlayerWindowController extensions in TouchBarSupport to call the new method - Add a hasTouchBar property to TouchBarSupport - Change MainWindowController.hideUI to not stop the timer that synchronizes the UI if the Mac has a touch bar This corrects a regression added by a change to hideUI to stop the timer when the OSC is hidden in order to save energy. That change failed to take into account that the timer also synchronizes controls in the touch bar on MacBooks that have one.
The regression was due to the change that stops the timer that synchronizes the UI when the OSC is hidden in order to save energy. That change failed to take into account that the timer also synchronizes controls in the touch bar on MacBooks that have one. In trying to correct the regression and yet not run the timer when it is not needed I looked for APIs that would answer:
Unfortunately Apple thinks there is no need for an application to know if the Mac has a touch bar. From the documentation for NSTouchBar:
I found isVisible was So to determine if the Mac has a touch bar the code is checking whether AppKit has called makeTouchBar. This allows the timer to be stopped on Macs that do not have touch bars. This also avoided running the timer when a MacBook with a touch bar is running in closed clamshell mode. Reviewers, is there a better way to determine if a touch bar is present? |
This commit will: - Change MainWindowController.hideUI to not stop the timer that synchronizes the UI if displaying the mini player - Change PlayerCore.switchToMiniPlayer to ensure the timer is running if media is playing
I've added an additional commit that addresses issue #4051 as it involves the same code. |
This commit will rename the new hasTouchBar property to needsTouchBar as recommended by review comment.
This commit will:
This corrects a regression added by a change to hideUI to stop the timer when the OSC is hidden in order to save energy. That change failed to take into account that the timer also synchronizes controls in the touch bar on MacBooks that have one.
Description: