Skip to content

Commit

Permalink
fix patch
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny-signal committed Nov 12, 2021
1 parent 6f44315 commit f9e9023
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions patches/chromium/fix_media_key_usage_with_globalshortcuts.patch
Expand Up @@ -59,24 +59,26 @@ index 9aec54a3263d24491d24013a80b719dfc834ecd4..001a6cb2a5eb701351fa924109b43fab
// true if register successfully, or false if 1) the specificied |accelerator|
// has been registered by another caller or other native applications, or
diff --git a/content/browser/media/media_keys_listener_manager_impl.cc b/content/browser/media/media_keys_listener_manager_impl.cc
index 5938f75742b793868638e693a9a8c8dc686dfc46..77ad79aab5232ce33f3af9793e70d6dd41cab913 100644
index 5938f75742b793868638e693a9a8c8dc686dfc46..b90dcdfdb9d7fc68e9f2bd0d0d88759cae34c3c7 100644
--- a/content/browser/media/media_keys_listener_manager_impl.cc
+++ b/content/browser/media/media_keys_listener_manager_impl.cc
@@ -55,7 +55,12 @@ bool MediaKeysListenerManagerImpl::StartWatchingMediaKey(
@@ -54,8 +54,14 @@ bool MediaKeysListenerManagerImpl::StartWatchingMediaKey(
bool should_start_watching = !is_active_media_session_controller ||
CanActiveMediaSessionControllerReceiveEvents();

+ fprintf(stderr, "%d\n", media_key_handling_enabled_);
// Tell the underlying MediaKeysListener to listen for the key.
- if (should_start_watching && media_keys_listener_ &&
+ if (
+#if defined(OS_MACOS)
+#if defined(OS_MAC)
+ !media_key_handling_enabled_ &&
+#endif // defined(OS_MAC)
+ should_start_watching &&
+ media_keys_listener_ &&
!media_keys_listener_->StartWatchingMediaKey(key_code)) {
return false;
}
@@ -231,18 +236,16 @@ void MediaKeysListenerManagerImpl::StartListeningForMediaKeysIfNecessary() {
@@ -231,18 +237,16 @@ void MediaKeysListenerManagerImpl::StartListeningForMediaKeysIfNecessary() {
media::AudioManager::GetGlobalAppName());
#endif

Expand Down

0 comments on commit f9e9023

Please sign in to comment.