summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbnativeinterface.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2013-06-28 11:51:29 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-07-30 15:08:31 +0200
commitd8090022f66cc6cff6af5ed2ae702212fd172ff7 (patch)
tree9942fb8e23293c49c62590fe714b8b8d6f961304 /src/plugins/platforms/xcb/qxcbnativeinterface.h
parent983e921c541f6eaacb9abcddb8ec079ec5129cf1 (diff)
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 <mardy@users.sourceforge.net> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbnativeinterface.h')
-rw-r--r--src/plugins/platforms/xcb/qxcbnativeinterface.h11
1 files changed, 10 insertions, 1 deletions
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 <qpa/qplatformnativeinterface.h>
#include <xcb/xcb.h>
+#include <QtCore/QRect>
+
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;