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:
36
Telegram/SourceFiles/platform/linux/linux_gsd_media_keys.h
Normal file
36
Telegram/SourceFiles/platform/linux/linux_gsd_media_keys.h
Normal 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
|
||||
Reference in New Issue
Block a user