Merge branch 'Plasma/5.6'

This commit is contained in:
Martin Gräßlin 2016-03-16 14:30:07 +01:00
commit 0b32c127bd
2 changed files with 22 additions and 0 deletions

View file

@ -79,5 +79,26 @@ void *NativeInterface::nativeResourceForWindow(const QByteArray &resource, QWind
return nullptr;
}
static void roundtrip()
{
if (!waylandServer()) {
return;
}
auto c = waylandServer()->internalClientConection();
if (!c) {
return;
}
c->flush();
waylandServer()->dispatch();
}
QFunctionPointer NativeInterface::platformFunction(const QByteArray &function) const
{
if (qstrcmp(function.toLower(), "roundtrip") == 0) {
return &roundtrip;
}
return nullptr;
}
}
}

View file

@ -35,6 +35,7 @@ public:
explicit NativeInterface(Integration *integration);
void *nativeResourceForIntegration(const QByteArray &resource) override;
void *nativeResourceForWindow(const QByteArray &resourceString, QWindow *window) override;
QFunctionPointer platformFunction(const QByteArray &function) const override;
private:
Integration *m_integration;