diff options
author | Leo Franchi <lfranchi@dropbox.com> | 2014-07-01 17:36:15 +0200 |
---|---|---|
committer | Leonardo Franchi <lfranchi@dropbox.com> | 2014-07-04 15:32:45 +0200 |
commit | 0eefa785a0d8bfe96403f9c13e80544cf8bb8eb3 (patch) | |
tree | 738be91ded23632a42cea8af102978fa60e1a06e /src/plugins/platforms/xcb/qxcbscreen.h | |
parent | 6577ac381e73b2ce3d57d2e8a39edb424ce9a52d (diff) |
Support transparency in qt5 system tray icons, regardless of tray visual
This ports the Qt4 method of supporting the system tray
window visual that has an alpha channel as well as ones
that do not. We detect whether or not we have a 32-bit
format and either use a Qt::transparent background, or
call xcb_clear_region before painting the icon.
[ChangeLog][Linux/XCB] Fix transparency of tray icons in cases where
there is no alpha channel or system tray visual.
Task-number: QTBUG-35832
Change-Id: I43d500c39846d2916dd39f8c47c8d85e59b49cae
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbscreen.h')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbscreen.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbscreen.h b/src/plugins/platforms/xcb/qxcbscreen.h index c36492db64..53ac65bb09 100644 --- a/src/plugins/platforms/xcb/qxcbscreen.h +++ b/src/plugins/platforms/xcb/qxcbscreen.h @@ -93,6 +93,7 @@ public: bool syncRequestSupported() const { return m_syncRequestSupported; } const xcb_visualtype_t *visualForId(xcb_visualid_t) const; + quint8 depthOfVisual(xcb_visualid_t) const; QString name() const { return m_outputName; } @@ -127,6 +128,7 @@ private: bool m_syncRequestSupported; xcb_window_t m_clientLeader; QMap<xcb_visualid_t, xcb_visualtype_t> m_visuals; + QMap<xcb_visualid_t, quint8> m_visualDepths; QXcbCursor *m_cursor; int m_refreshRate; int m_forcedDpi; |