Frame callbacks only indicate when the client can start rendering a new
frame, it's not meant to be precise. If the client wants to do some
black magic with frame scheduling and so on, it needs to use a protocol
such as presentation_time. This change removes the pointless flush to
prevent over-flushing client connections.
We have a situation where some clients drop their old offer before
creating a new one. This means klipper tries to fill in the empty
clipboard at the same time the client posts its new real contents.
This adds in a flag (via a hidden mimetype) that klipper is trying to
replace a null clipboard. If this flag is set and our clipboard is not
null because the client has updated it in the meantime we ignore the
klipper update.
It's a workaround, rather than an ideal fix at a data level, but it
solves the problem in the interim.
CCBUG: 424855
SeatInterface cleans up when a data source goes away. However the
cleanup also makes use of metaobjects so needs to run before the leaf
class destructor is run.
All other AbstractDataSource objects emit the unbound signal, which
SeatInterface also connects to do a earlier cleanup. Otherwise we get a
crash if a data control source replaces itself.
Order of a client teardown is:
- ClientConnection is removed from the static map
- All our client owned resources are torn down
- ClientConnection is deleted (via a previous deleteLater)
The recent refactor led to a behavioural change where ::client could
return a null pointer.
We want the client getter to be valid throughout the lifespan of
SurfaceInterface, by doing the lookup once we achieve that.
BUG: 424255
It can be especially useful if the compositor wants to ensure that all
globals have been created before starting to accept client connections.
Unfortunately, start() and terminate() stuff doesn't align well with it,
so the terminate() method was dropped to ensure that Display always
returns the same wl_display object.
The main purpose behind the kwaylandserver library is to provide a set
of re-usable wayland compositor extension implementations. However, it's
worth noting that the design of kwaylandserver is far from perfect at
the moment.
KWaylandServer tries to hide all low level wayland details from the
compositor. But it's not the case with buffers, which diminishes the
whole point behind the library.
Creating OpenGL textures from Wayland buffers is the responsibility of
the compositor. So, when it comes to client buffers, we are one foot in
KWaylandServer, and the other foot in the compositor.
Since the surface size is a logical size, the compositor can't use it
for allocating memory for OpenGL textures. This change adds the buffer
size property in SurfaceInterface that can be used for allocating memory
for textures as well as monitoring buffer size changes.
I must say that the introduction of the buffer size property is a crude
hack because BufferInterface just needs to provide an OpenGL texture for
each plane. The main blocker for that is that it would involve moving
the backend, the compositor, and the wayland bits in the same place, for
example kwayland-server or ultimately kwin.
The buffer scale and the buffer transform property specify transforms
that had been applied to the buffer's contents. Neither one of those
properties apply to the surface, in other words the buffer transform
property doesn't indicate that the surface was rotated or flipped or both.
This change doesn't gain anything in terms of new features, etc. It just
attempts to make things more clear.
The source can have a different lifespan to the offer being made.
If a source is removed and we get a drag actions changed before the
offer is cancelled we don't want to crash.
Couldn't reproduce locally, but the trace was good.
BUG: 423127
The compositor needs to monitor changes in the mapping between the
surface local coordinates and the buffer coordinates because texture
coordinates correspond to the latter. One way to do it is to monitor
things such as the surface size, the buffer size, the buffer scale,
etc. The main problem with doing so is that there are so many factors
that contribute to how mapping between the surface local coordinate
space and the buffer coordinate space is performed.
In order to provide a generic way for monitoring changes in the mapping
between the surface local coordinate space and the buffer coordinate
space, this patch introduces two new matrices. The first one specifies
how the surface-local coordinates are mapped to buffer coordinates, and
the other one specifies how to map the buffer coordinates to surface
local coordinates.
With the new two matrices, the compositor has a generic way to get
notified when it has to re-compute texture coordinates.