summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbnativeinterface.h
diff options
context:
space:
mode:
authorMartin Gräßlin <mgraesslin@kde.org>2014-03-06 14:46:46 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-08 08:18:24 +0100
commit2f63d04ff1e9c28f5c5c6465306f6e19ba781287 (patch)
tree1388cea40627e5c02fa51ae30e4a4282697b1434 /src/plugins/platforms/xcb/qxcbnativeinterface.h
parent51f7ef800ee84f9cbc0e1f742c2d869f887bd5ed (diff)
Export rootWindow to the QXcbNativeInterface
This change exports the root window to the native interface as there is QX11Info::appRootWindow which so far goes over the QDesktopWidget to get the window id of the root window. Which is a rather hackish way considering that the root window is known to the QXcbConnection. But even more it's a very fragile way and can result in crashes on startup of applications if the application accesses the appRootWindow too early. Change-Id: Ibb09a7fa714cb355f579298fc6df33bf80f73f58 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbnativeinterface.h')
-rw-r--r--src/plugins/platforms/xcb/qxcbnativeinterface.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.h b/src/plugins/platforms/xcb/qxcbnativeinterface.h
index 9c4fa44d3b..fb1a46014c 100644
--- a/src/plugins/platforms/xcb/qxcbnativeinterface.h
+++ b/src/plugins/platforms/xcb/qxcbnativeinterface.h
@@ -70,7 +70,8 @@ public:
StartupId,
TrayWindow,
GetTimestamp,
- X11Screen
+ X11Screen,
+ RootWindow
};
QXcbNativeInterface();
@@ -94,6 +95,7 @@ public:
void *getTimestamp(const QXcbScreen *screen);
void *startupId();
void *x11Screen();
+ void *rootWindow();
static void setAppTime(QScreen *screen, xcb_timestamp_t time);
static void setAppUserTime(QScreen *screen, xcb_timestamp_t time);
static void *eglContextForContext(QOpenGLContext *context);