2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-10-23 14:48:19 +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

@@ -24,6 +24,11 @@ typedef struct _GDBusProxy GDBusProxy;
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
namespace Platform {
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
namespace internal {
class GSDMediaKeys;
} // namespace internal
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
class MainWindow : public Window::MainWindow {
public:
@@ -88,6 +93,8 @@ private:
DBusMenuExporter *_mainMenuExporter = nullptr;
QDBusObjectPath _mainMenuPath;
std::unique_ptr<internal::GSDMediaKeys> _gsdMediaKeys;
QMenu *psMainMenu = nullptr;
QAction *psLogout = nullptr;
QAction *psUndo = nullptr;