Instead of performing dispatchEvents for a hard coded number of
expected events from Xwayland, we use select on the pipe to figure
out whether Xwayland has started writing the display number. As long
as select does not indicate that the pipe is ready we need to dispatch
further events.
Anologous to the implementation in Pointer:
* signal entered and left
* Surface *enteredSurface()
The passed in keys are not yet passed along and
currently ignored.
Now the code handles correctly the attaching of a null buffer
(emits a signal unmapped) and if a commit doesn't have a pending
buffer it won't be reset. Damage requests are ignored if no buffer
has been attached yet.
Properly reset focus when surfaces get added/removed. E.g. when
writing in Kate additional surfaces are created for which we do
not want to pass focus.
If one passes StartMode::ConnectClientsOnly the socket in
XDG_RUNTIME_DIR is not created and instead one can only connect to
this server using the Display::createClient method. A very nice
solution to just have a Server and one dedicated Client talk to each
other.
The selection is supposed to be sent to the DataDeviceInterface just
before getting keyboard focus. In order to do that the SeatInterface
keeps track of the DataDeviceInterface which is the current selection
and the DataDeviceInterface of the focused keyboard client.
SeatInterface friends DataDeviceManagerInterface so that the latter
can register each created DataDevice for the SeatInterface.
The button state is a seat-global state and not a per pointer state.
All pressed/released and axis events are moved to the SeatInterface
and just invoke the related method on the focused surface pointer.
Makes PointerInterface more like other Interface classes wrapping
wl_resource. The most important change is the handling of the
focused surface. This is now kept in the SeatInterface and can also
be set if there is no PointerInterface for the client yet.
The unit tests had to be adjusted and some are also disabled as the
button events are not yet moved into SeatInterface.
This method is supposed to return the PointerInterface for the current
focused surface. At the moment it just creates the one global
PointerInterface. The existing SeatInterface::pointer method got
removed as that is actually wrong usage.
There can only be one focused surface per Seat, thus the information
should be hold in the seat.
This only adjusts the API, the actual data is still hold in the
PointerInterface. This still needs adjustment.