summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/platforms/xcb/qxcbnativeinterface.cpp9
-rw-r--r--src/plugins/platforms/xcb/qxcbnativeinterface.h4
2 files changed, 12 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
index 1c9903e234..99e9932847 100644
--- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
+++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
@@ -85,6 +85,7 @@ public:
insert("hintstyle", QXcbNativeInterface::ScreenHintStyle);
insert("startupid", QXcbNativeInterface::StartupId);
insert(QByteArrayLiteral("traywindow"), QXcbNativeInterface::TrayWindow);
+ insert(QByteArrayLiteral("gettimestamp"), QXcbNativeInterface::GetTimestamp);
}
};
@@ -200,6 +201,9 @@ void *QXcbNativeInterface::nativeResourceForScreen(const QByteArray &resource, Q
if (QXcbSystemTrayTracker *s = systemTrayTracker(screen))
result = (void *)quintptr(s->trayWindow());
break;
+ case GetTimestamp:
+ result = getTimestamp(xcbScreen);
+ break;
default:
break;
}
@@ -254,6 +258,11 @@ void *QXcbNativeInterface::appUserTime(const QXcbScreen *screen)
return reinterpret_cast<void *>(quintptr(screen->connection()->netWmUserTime()));
}
+void *QXcbNativeInterface::getTimestamp(const QXcbScreen *screen)
+{
+ return reinterpret_cast<void *>(quintptr(screen->connection()->getTimestamp()));
+}
+
void *QXcbNativeInterface::startupId()
{
QXcbIntegration* integration = static_cast<QXcbIntegration *>(QGuiApplicationPrivate::platformIntegration());
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.h b/src/plugins/platforms/xcb/qxcbnativeinterface.h
index c671d417e9..86b94e62e4 100644
--- a/src/plugins/platforms/xcb/qxcbnativeinterface.h
+++ b/src/plugins/platforms/xcb/qxcbnativeinterface.h
@@ -69,7 +69,8 @@ public:
AppUserTime,
ScreenHintStyle,
StartupId,
- TrayWindow
+ TrayWindow,
+ GetTimestamp
};
QXcbNativeInterface();
@@ -91,6 +92,7 @@ public:
void *graphicsDeviceForWindow(QWindow *window);
void *appTime(const QXcbScreen *screen);
void *appUserTime(const QXcbScreen *screen);
+ void *getTimestamp(const QXcbScreen *screen);
void *startupId();
static void setAppTime(QScreen *screen, xcb_timestamp_t time);
static void setAppUserTime(QScreen *screen, xcb_timestamp_t time);