This signal is useful if the compositor wants to perform some cleanup
before the disconnected signal is emitted or while the connection object
still has valid wl_client native handle.
libwayland-server ensures that the requested version is less than or
equal to the global version.
This change removes the global version check to simplify the generated
code and reduce memory usage footprint, however the latter shouldn't be
that noticeable.
Unfortunately, we cannot just simply unset the wl_global's user data.
The compositor still needs to process client requests after the global
has been removed, for example bind requests or the requests that create
new resources.
CCBUG: 435258
Otherwise we disable it and all events will be disabled (since surface
gets cleared).
This is especially useful since otherwise we lose synchronicity with the
client and weird behaviours happen (like when the client thinks it has a
keyboard but it actually does not).
Fixes the following backtrace:
*0 KWaylandServer::DataDeviceInterface::dragSource() const (this=0x0)
at ./src/server/datadevice_interface.cpp:199
*1 0x00007f10d67b0c71 in
KWaylandServer::DataDeviceInterface::updateDragTarget(KWaylandServer::SurfaceInterface*,
unsigned int) (this=0x55c42e3ee9a0,
surface=surface@entry=0x55c42e4b3170, serial=serial@entry=3104)
at ./src/server/datadevice_interface.cpp:278
*2 0x00007f10d67d8e52 in
KWaylandServer::SeatInterface::setDragTarget(KWaylandServer::SurfaceInterface*,
QPointF const&, QMatrix4x4 const&)
(this=this@entry=0x55c42d422ed0, surface=0x55c42e4b3170,
globalPosition=..., inputTransformation=...) at
/usr/include/c++/9/bits/atomic_base.h:413
*3 0x00007f10d67d9209 in
KWaylandServer::SeatInterface::setDragTarget(KWaylandServer::SurfaceInterface*,
QMatrix4x4 const&) (this=this@entry=0x55c42d422ed0, surface=<optimized
out>, inputTransformation=...)
at ./src/server/seat_interface.cpp:578
*4 0x000055c42cb4563a in KWin::Xwl::XToWlDrag::setDragTarget()
(this=this@entry=0x55c42ea07a00) at ./src/toplevel.h:990
*5 0x000055c42cb47a68 in KWin::Xwl::XToWlDrag::offerCallback(QString
const&) (mime=..., this=0x55c42ea07a00) at ./src/xwl/drag_x.cpp:242
*6 KWin::Xwl::XToWlDrag::offerCallback(QString const&)
(this=0x55c42ea07a00, mime=...) at ./src/xwl/drag_x.cpp:237
*7 0x00007f10d5dc06fe in () at /lib/x86_64-linux-gnu/libQt5Core.so.5
I've been using kwaylandserver without this workaround for a while and
haven't experienced any issues. Also, there were some sub-surface fixes
in QtWayland.
Non-current output modes were deprecated due to various reasons, e.g.
it's not possible to remove some nodes; two modes can have the same
resolution and the refresh rate but different flags, but wl_output.mode
fails to communicate that properly; the usefulness of non-current modes
is questionable. For more details, please refer to [1].
[1] https://gitlab.freedesktop.org/wayland/wayland/-/issues/92
The usage of nested private classes is highly discouraged in
kwaylandserver due to various reasons, e.g. it's easy to forget to put
Q_DECL_HIDDEN, etc.
Currently, the SurfaceInterface class has a signal that is emitted
whenever any sub-surfaces in its sub-tree changes in a way that requires
a repaint. It is emitted when a sub-surface is resized, moved, or
damaged, etc. There is no way for the compositor to track changes in the
stacking order of sub-surfaces efficiently.
This change replaces the subTreeChanged signal with a less noisy signal
that's emitted whenever the list of direct child sub-surfaces changes.
This is needed for keyboard grabs. If the seat is notified about a
keyboard event, it will need to forward the event to the grab object,
which in its turn will decide what should happen to the event.
When hot plugging outputs, we may hit the wl_global race condition.
We need to delay the destruction of output device globals to prevent
hitting that race condition.
Destroying a global leads to a race on the client. If a client binds
at just the wrong moment they will use an invalid ID and cause a
protocol error. The current best thing to do is to announce the removal
then remove the global (and thus the ID) only after a delay. Non-ideal,
but better than nothing.
Pragmatically this affects only:
Blur/Contrast/Slide/Output/OutputDevice
See https://gitlab.freedesktop.org/wayland/wayland/issues/10 for more.
In plasma code, it's more common to see `/** ... */` doxygen comments
rather than `/** ... **/`.
This change fixes up doxygen comment terminators to prevent inconsistency
issues.