diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-06-28 11:51:29 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-07-30 15:08:31 +0200 |
commit | d8090022f66cc6cff6af5ed2ae702212fd172ff7 (patch) | |
tree | 9942fb8e23293c49c62590fe714b8b8d6f961304 /src/plugins/platforms/xcb/qxcbconnection.h | |
parent | 983e921c541f6eaacb9abcddb8ec079ec5129cf1 (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/qxcbconnection.h')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h index 8f568c6c25..aa0e070061 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.h +++ b/src/plugins/platforms/xcb/qxcbconnection.h @@ -87,6 +87,7 @@ class QXcbKeyboard; class QXcbClipboard; class QXcbWMSupport; class QXcbNativeInterface; +class QXcbSystemTrayTracker; namespace QXcbAtom { enum Atom { @@ -98,6 +99,8 @@ namespace QXcbAtom { _NET_WM_CONTEXT_HELP, _NET_WM_SYNC_REQUEST, _NET_WM_SYNC_REQUEST_COUNTER, + MANAGER, // System tray notification + _NET_SYSTEM_TRAY_OPCODE, // System tray operation // ICCCM window state WM_STATE, @@ -321,6 +324,7 @@ public: virtual void handleConfigureNotifyEvent(const xcb_configure_notify_event_t *) {} virtual void handleMapNotifyEvent(const xcb_map_notify_event_t *) {} virtual void handleUnmapNotifyEvent(const xcb_unmap_notify_event_t *) {} + virtual void handleDestroyNotifyEvent(const xcb_destroy_notify_event_t *) {} virtual void handleButtonPressEvent(const xcb_button_press_event_t *) {} virtual void handleButtonReleaseEvent(const xcb_button_release_event_t *) {} virtual void handleMotionNotifyEvent(const xcb_motion_notify_event_t *) {} @@ -433,6 +437,9 @@ public: void ungrabServer(); QXcbNativeInterface *nativeInterface() const { return m_nativeInterface; } + + QXcbSystemTrayTracker *systemTrayTracker(); + private slots: void processXcbEvents(); @@ -566,6 +573,7 @@ private: QXcbWindow *m_focusWindow; QByteArray m_startupId; + QXcbSystemTrayTracker *m_systemTrayTracker; }; #define DISPLAY_FROM_XCB(object) ((Display *)(object->connection()->xlib_display())) |