diff options
author | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-02-17 16:00:00 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@digia.com> | 2015-02-25 12:15:53 +0000 |
commit | 8f9a72c39df46e94b38dd804b7cdffaed9f340b9 (patch) | |
tree | 2511e9667ef089880fa167aa5938a9e7077c3650 /src/widgets/util/qsystemtrayicon_x11.cpp | |
parent | 2cac171ddedfecdfc6fa27c5326f9eebfab1822e (diff) |
Move the systemTrayVisualHasAlphaChannel to the QXcbSystemTrayTracker
also expose it through the QXcbScreenFunctions platform header and use
it in the qsystemtrayicon_x11.cpp. This gives us static typechecking.
Change-Id: Ia9e2e2563ed5994be0b19d7bcf5a6aca92b1b760
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/widgets/util/qsystemtrayicon_x11.cpp')
-rw-r--r-- | src/widgets/util/qsystemtrayicon_x11.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/widgets/util/qsystemtrayicon_x11.cpp b/src/widgets/util/qsystemtrayicon_x11.cpp index b9b67c1df2..2752c56c65 100644 --- a/src/widgets/util/qsystemtrayicon_x11.cpp +++ b/src/widgets/util/qsystemtrayicon_x11.cpp @@ -53,6 +53,7 @@ #include <qdebug.h> #include <QtPlatformHeaders/qxcbwindowfunctions.h> +#include <QtPlatformHeaders/qxcbintegrationfunctions.h> #ifndef QT_NO_SYSTEMTRAYICON QT_BEGIN_NAMESPACE @@ -113,10 +114,7 @@ QSystemTrayIconSys::QSystemTrayIconSys(QSystemTrayIcon *qIn) // window to ParentRelative (so that it inherits the background of its X11 parent window), call // xcb_clear_region before painting (so that the inherited background is visible) and then grab // the just-drawn background from the X11 server. - bool hasAlphaChannel = false; - QMetaObject::invokeMethod(QGuiApplication::platformNativeInterface(), - "systrayVisualHasAlphaChannel", Qt::DirectConnection, - Q_RETURN_ARG(bool, hasAlphaChannel)); + bool hasAlphaChannel = QXcbIntegrationFunctions::xEmbedSystemTrayVisualHasAlphaChannel(); setAttribute(Qt::WA_TranslucentBackground, hasAlphaChannel); if (!hasAlphaChannel) { createWinId(); |