-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GTK] Creates a lot of MPRIS notifications with no reason
https://bugs.webkit.org/show_bug.cgi?id=247527 Reviewed by Philippe Normand. At any given time, there should be only one active MPRIS session. MediaSessionManagerGLib would not unregister inactive MPRIS sessions once a new one became the current session. This patch ensures that once a new current session is set, all others both unregistered and marked as ineligible for future registration on status changes. * Source/WebCore/platform/audio/glib/MediaSessionGLib.cpp: (WebCore::MediaSessionGLib::~MediaSessionGLib): (WebCore::MediaSessionGLib::ensureMprisSessionRegistered): (WebCore::MediaSessionGLib::unregisterMprisSession): (WebCore::MediaSessionGLib::emitPositionChanged): (WebCore::MediaSessionGLib::getPlaybackStatusAsGVariant): (WebCore::MediaSessionGLib::emitPropertiesChanged): * Source/WebCore/platform/audio/glib/MediaSessionGLib.h: (WebCore::MediaSessionGLib::setMprisRegistrationEligibility): (WebCore::MediaSessionGLib::mprisRegistrationEligibility const): (WTF::LogArgument<WebCore::MediaSessionGLib::MprisRegistrationEligiblilty>::toString): * Source/WebCore/platform/audio/glib/MediaSessionManagerGLib.cpp: (WebCore::MediaSessionManagerGLib::setPrimarySessionIfNeeded): (WebCore::MediaSessionManagerGLib::unregisterAllOtherSessions): (WebCore::MediaSessionManagerGLib::nowPlayingEligibleSession): Modified to reflect the Cocoa implementation (WebCore::MediaSessionManagerGLib::updateNowPlayingInfo): (WebCore::MediaSessionManagerGLib::setCurrentSession): * Source/WebCore/platform/audio/glib/MediaSessionManagerGLib.h: Canonical link: https://commits.webkit.org/276591@main
- Loading branch information
1 parent
28e1e82
commit 5e2b534
Showing
4 changed files
with
98 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters