Commit graph

3 commits

Author SHA1 Message Date
Martin Gräßlin
fe745177e0 [plugins/qpa] Add a roundtrip platform function
Summary:
Mostly intended for plugins loaded into KWin and wanting to use
KWayland::Client::ConnectionThread::roundtrip(). By providing this
function we can ensure that KWin does not block and nevertheless
perform the required roundtrip.

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1153
2016-03-16 11:10:14 +01:00
Martin Gräßlin
6c746764b4 [plugins/qpa] Safety checks in native interface
During startup it might happen that the QPA is already loaded, but
the wayland server and it's internal connection not yet fully
created. Thus safety check for it.
2015-12-18 15:27:47 +01:00
Martin Gräßlin
26b3569a0b [wayland] Add a QPA plugin for kwin_wayland
This introduces an own QPA plugin for KWin. QtWayland's plugin is not
a good solution for KWin as QtWayland is meant for Wayland clients and
not for a Wayland server. Given that it makes more sense to have a very
minimal QPA plugin which supports the use cases we actually have.

With our own QPA plugin we should be able to improve the following
areas:
* no need to create Wayland server before QApplication
* Qt::BypassWindowManagerHint can be supported
* no workaround for creating OpenGL context in main thread
* sharing OpenGL context with Qt
* OpenGL context for Qt on libhybris backend

The plugin supports so far the following features:
* creating a QPlatformWindow using KWayland::Client (ShellSurface)
* creating a QPlatformBackingStore using a ShmPool
* creating a QPlatformOpenGLContext with Wayland::EGL
* or creating a QPlatformOpenGLContext which shares with KWin's scene
* creating a QPlatformScreen for each KWayland::Client::Output
* QPlatformNativeInterface compatible to QtWayland
2015-08-25 14:33:50 +02:00