diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2014-11-28 09:20:19 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@digia.com> | 2015-01-22 12:50:51 +0100 |
commit | 38abd653774aa0b3c5cdfd9a8b78619605230726 (patch) | |
tree | 00dba009a99dfc5c4e85d3f73dd94da1f2120e69 /src/plugins/platforms/xcb/qxcbnativeinterface.h | |
parent | 3c37066062d61a430b8e7f970cccf6effab5a3ef (diff) |
QSystemTrayIcon uses D-Bus StatusNotifier on Linux when possible
Implementing org.kde.StatusNotifier DBus interface
http://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/
as well as org.canonical.dbusmenu for the limited purpose of showing
the tray icon's context menu. If a desktop environment (such as
KDE or Unity) has a StatusNotifierWatcher listening, then tray icon
information is sent to be displayed by the tray implementation
instead of being rendered directly in an XEmbed window. This is
necessary because some modern tray implementations no longer provide
XEmbed "hosting".
[ChangeLog][QPA][Xcb] QSystemTrayIcon uses StatusNotifier D-Bus
protocol when the desktop environment supports it
Task-number: QTBUG-31762
Done-with: Marco Martin <mart@kde.org>
Change-Id: I3b1f744d621eefc7e9c61d1469460ebfcc77fc54
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbnativeinterface.h')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbnativeinterface.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.h b/src/plugins/platforms/xcb/qxcbnativeinterface.h index 1db2d1cf83..df3efb037c 100644 --- a/src/plugins/platforms/xcb/qxcbnativeinterface.h +++ b/src/plugins/platforms/xcb/qxcbnativeinterface.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the plugins of the Qt Toolkit. @@ -47,6 +47,7 @@ class QWidget; class QXcbScreen; class QXcbConnection; class QXcbNativeInterfaceHandler; +class QDBusMenuConnection; class Q_XCB_EXPORT QXcbNativeInterface : public QPlatformNativeInterface { @@ -121,6 +122,7 @@ private: xcb_atom_t m_sysTraySelectionAtom; xcb_visualid_t m_systrayVisualId; + QDBusMenuConnection *m_dbusTrayConnection; static QXcbScreen *qPlatformScreenForWindow(QWindow *window); |