diff options
author | Uli Schlachter <psychon@znc.in> | 2014-12-04 17:57:02 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@digia.com> | 2014-12-09 16:01:59 +0100 |
commit | 2203d9d93e24e00d6e9bc9bda0e65a0c7f9923cc (patch) | |
tree | 67cf443dc490d58a66c63cc2494fd96f9424d4a2 /src/plugins/platforms/xcb/qxcbnativeinterface.h | |
parent | 459e22a9dfd7105918528def302604a6c0628115 (diff) |
xcb: Fix transparent tray backgrounds with 24bpp tray visuals
Commit 0eefa785a0d8 ported Qt4's method of indirectly drawing the tray
icon's background to Qt5. This commit makes it work a bit better.
When drawing the tray's background, we use a ClearArea request to make
the X11 server fill the tray icon with its background. Then we grab that
background from the server and paint the icon on top of it. So this is
pretty much pseudo-transparency at work. One small ingredient that was
missing before is the BackgroundPixmap of the tray icon. If this
attribute is set to ParentRelative, then our tray icon inherits the
background of its parent window. That way the ClearArea will actually
produce the expected background.
Task-number: QTBUG-35832
Change-Id: I63fc4609064d8f858ca9e5cc290409a298b918b7
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
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.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.h b/src/plugins/platforms/xcb/qxcbnativeinterface.h index b667f1a372..3ec96975f5 100644 --- a/src/plugins/platforms/xcb/qxcbnativeinterface.h +++ b/src/plugins/platforms/xcb/qxcbnativeinterface.h @@ -106,6 +106,7 @@ public: Q_INVOKABLE void beep(); Q_INVOKABLE bool systemTrayAvailable(const QScreen *screen) const; Q_INVOKABLE void clearRegion(const QWindow *qwindow, const QRect& rect); + Q_INVOKABLE void setParentRelativeBackPixmap(const QWindow *window); Q_INVOKABLE bool systrayVisualHasAlphaChannel(); Q_INVOKABLE bool requestSystemTrayWindowDock(const QWindow *window); Q_INVOKABLE QRect systemTrayWindowGlobalGeometry(const QWindow *window); |