From d8090022f66cc6cff6af5ed2ae702212fd172ff7 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 28 Jun 2013 11:51:29 +0200 Subject: Move the X11 system tray code from widgets into XCB-plugin. - Add system tray tracker class to XCB plugin and provide functionality via invokable slots of the native interface. - Remove XLib-dependency of widgets/utils. - Reintroduce tracking of tray window destruction and recreation, which was removed in the XLib-code when porting it from Qt 4 to Qt 5. This paves the way for implementing the tray icon completely in terms of QPlatformSystemTrayIcon at some point later. Change-Id: Ia04268b0e2919c05874a3e9548930535332897c7 Reviewed-by: Alberto Mardegan Reviewed-by: Shawn Rutledge --- src/plugins/platforms/xcb/qxcbnativeinterface.h | 11 ++++++++++- 1 file changed, 10 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 e27bfa5a46..c671d417e9 100644 --- a/src/plugins/platforms/xcb/qxcbnativeinterface.h +++ b/src/plugins/platforms/xcb/qxcbnativeinterface.h @@ -45,6 +45,8 @@ #include #include +#include + QT_BEGIN_NAMESPACE class QWidget; @@ -66,7 +68,8 @@ public: AppTime, AppUserTime, ScreenHintStyle, - StartupId + StartupId, + TrayWindow }; QXcbNativeInterface(); @@ -95,6 +98,12 @@ public: static void *glxContextForContext(QOpenGLContext *context); Q_INVOKABLE void beep(); + Q_INVOKABLE bool systemTrayAvailable(const QScreen *screen) const; + Q_INVOKABLE bool requestSystemTrayWindowDock(const QWindow *window); + Q_INVOKABLE QRect systemTrayWindowGlobalGeometry(const QWindow *window); + +signals: + void systemTrayWindowChanged(QScreen *screen); private: const QByteArray m_genericEventFilterType; -- cgit v1.2.3