The EventQueue is a wrapper for wl_event_queue. The usage is for the
case that the connection is in a different thread.
The EventQueue needs to be added to the Registry before Registry::create
is invoked. This ensures that the Registry gets added to the EventQueue
and all objects created by the Registry (and further down the tree)
will be added to the same EventQueue.
The auto-tests which already used a wl_event_queue are transited to the
EventQueue class. That's also the reason why there is no dedicated
unit test: the new code is sufficiently tested by the existing tests.
This makes the API more consistent and allows to properly cleanup
Keyboard and Pointer if the connection dies. Like with Shell and
ShellSurface signals are emitted from Seat when the interface is
going to be released or destroyed. These are connected to the
methods of the created Pointer and Keyboard.
The Buffers are exclusively hold by ShmPool. The user of a Buffer is not
supposed to delete it as a no longer used Buffer should be reused by the
ShmPool.
To make it obvious that the ownership of the pointer is not passed to the
user the return type is changed to QWeakPointer. This also allows the
ShmPool to destroy Buffers as needed.
The unit test found a few problems which are now addressed
* getBuffer did not check the format when reusing a buffer
* creatBuffer used the wrong method on QSize to check whether it is empty
* destroy didn't call destroy on the Buffer. This is now added by moving
the Buffer::Private in a dedicated header which can also be included
from the ShmPool
Ensure that we do not connect to a version which our client library
does not support. If we would allow higher versions we would run the
risk that the wayland library calls into not existing callbacks.
It also adds a
static SurfaceInterface *get(wl_resource*)
to SurfaceInterface which can find the SurfaceInterface for the
given wl_resource. This is needed for ShellSurfaceInterface which
can no longer just cast the wayland user data.
Framework style build system which generates two libraries:
* KF5WaylandClient
* KF5WaylandServer
autotests are adjusted to compile again. They need to be changed to
use the libraries once the export header gets generated.