From 38abd653774aa0b3c5cdfd9a8b78619605230726 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 28 Nov 2014 09:20:19 +0100 Subject: QSystemTrayIcon uses D-Bus StatusNotifier on Linux when possible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Change-Id: I3b1f744d621eefc7e9c61d1469460ebfcc77fc54 Reviewed-by: Jørgen Lind Reviewed-by: Dmitry Shachnev --- src/plugins/platforms/xcb/qxcbnativeinterface.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms/xcb/qxcbnativeinterface.h') 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); -- cgit v1.2.3