2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-01 15:15:13 +00:00

Moved Linux MPRIS support to lib_base.

This commit is contained in:
23rd
2021-06-08 23:30:59 +03:00
parent 69eaecc218
commit 32e47c24b4
4 changed files with 0 additions and 554 deletions

View File

@@ -29,7 +29,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "base/platform/linux/base_linux_xdp_utilities.h"
#include "platform/linux/linux_notification_service_watcher.h"
#include "platform/linux/linux_xdp_file_dialog.h"
#include "platform/linux/linux_mpris_support.h"
#include "platform/linux/linux_gsd_media_keys.h"
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
@@ -544,22 +543,13 @@ void SetDarkMode() {
void SetWatchingMediaKeys(bool watching) {
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
static std::unique_ptr<internal::MPRISSupport> MPRISInstance;
static std::unique_ptr<internal::GSDMediaKeys> GSDInstance;
if (watching) {
if (!MPRISInstance) {
MPRISInstance = std::make_unique<internal::MPRISSupport>();
}
if (!GSDInstance) {
GSDInstance = std::make_unique<internal::GSDMediaKeys>();
}
} else {
if (MPRISInstance) {
MPRISInstance = nullptr;
}
if (GSDInstance) {
GSDInstance = nullptr;
}