2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Take control over macOS media keys only when using music player. #2549

This commit is contained in:
John Preston
2016-10-22 17:35:37 +03:00
parent 77df38b4fd
commit 130c41d711
7 changed files with 62 additions and 12 deletions

View File

@@ -1640,6 +1640,8 @@ void MainWidget::closeBothPlayers() {
if (Media::Player::exists()) {
Media::Player::instance()->stop();
}
Shortcuts::disableMediaShortcuts();
}
void MainWidget::createPlayer() {
@@ -1657,6 +1659,8 @@ void MainWidget::createPlayer() {
_playerHeight = _contentScrollAddToY = _player->contentHeight();
updateControlsGeometry();
}
Shortcuts::enableMediaShortcuts();
}
void MainWidget::playerHeightUpdated() {