diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2015-10-27 15:08:41 +0300 |
---|---|---|
committer | Gatis Paeglis <gatis.paeglis@qt.io> | 2018-07-10 20:03:53 +0000 |
commit | 5cf6f51b4c73cb1309279aa42d828097b24aa119 (patch) | |
tree | c5ecc96c74ba59d62c623fc096abacaa11113aad /src/plugins/platforms/xcb/qxcbwindow.h | |
parent | d743df975db3403ec83d67bd376d8a6bfea3dfb0 (diff) |
xcb: Fix artifacts on the tray background with lock screens
With the current method of painting the tray icon with 24 bpp
visuals we grab the window's background once on the first show
and then use it in all paint operations. This leads to a wrong
background if an application shows the system tray icon when
the lock screen is active.
We can avoid this by painting with XRender when it's available.
This change introduces QXcbSystemTrayBackingStore and moves the
selection of a suitable painting method from QSystemTrayIconSys
into it. In addition the visual for the window is selected
according to the system tray specification and the platform window
for the tray icon is created without needless OpenGL and Vulkan
support.
Task-number: QTBUG-55540
Change-Id: Ib3ca42bc02dcbdd4ccfe5d6e23f870ef22f0d25a
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbwindow.h')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbwindow.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h index 49968b2e0d..93526685cf 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.h +++ b/src/plugins/platforms/xcb/qxcbwindow.h @@ -179,6 +179,8 @@ public: bool startSystemMoveResize(const QPoint &pos, int corner); bool doStartSystemMoveResize(const QPoint &globalPos, int corner); + bool isTrayIconWindow() const { return m_trayIconWindow; } + virtual void create(); virtual void destroy(); @@ -259,6 +261,7 @@ protected: bool m_embedded = false; bool m_alertState = false; bool m_minimized = false; + bool m_trayIconWindow = false; xcb_window_t m_netWmUserTimeWindow = XCB_NONE; QSurfaceFormat m_format; |