2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-10-23 15:06:09 +00:00

Add support for G-S-D's media-keys extension

This fixes media keys handling on (but not limited to, probably):
* GNOME
* Cinnamon
* MATE
* Budgie
* Pantheon (elementaryOS)
* Unity
This commit is contained in:
Ilya Fedin
2020-12-27 15:30:19 +04:00
committed by John Preston
parent 486424af4f
commit 28f857f763
5 changed files with 250 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
typedef struct _GDBusConnection GDBusConnection;
namespace Platform {
namespace internal {
class GSDMediaKeys {
public:
GSDMediaKeys();
GSDMediaKeys(const GSDMediaKeys &other) = delete;
GSDMediaKeys &operator=(const GSDMediaKeys &other) = delete;
GSDMediaKeys(GSDMediaKeys &&other) = delete;
GSDMediaKeys &operator=(GSDMediaKeys &&other) = delete;
~GSDMediaKeys();
private:
GDBusConnection *_dbusConnection = nullptr;
QString _service;
QString _objectPath;
QString _interface;
uint _signalId = 0;
bool _grabbed = false;
};
} // namespace internal
} // namespace Platform