I am trying to build against a Qt built without OpenGL. In that case, the
openGL headers have not been included and therefore GLboolean is not
defined. Use EGLBoolean to match the EGL prototype.
See also d18486c033
If the plasma window resource is inert, the associated get_icon handler
won't be invoked. This results in leaked file descriptors.
With this change, the corresponding close() function call will be
generated to avoid leaking file descriptors and potentially crashing the
session due to kwin running out of fds.
BUG: 438097
Currently, send_current_mode() is called for every mode resource, no
matter whether the given output resource and mode resource belong to the
same client, libwayland-server doesn't like that and it prints a warning
about a compositor bug.
With this change, the output device will remember the mode resources for
every output resource and avoid sending current_mode events with modes
that belong to other clients.
In a recent refactor a guard seemingly in the wrong place on
SeatInterface was moved into AbstractDataSource, as typically that's
where we guard.
However it turns out the original code was correct, we want to send
cancel for all clipboard cancels, but for D&D it's version dependent.
This class introduces a new method to astract that from seat.
This abstract class represents an object that receives drag and drop
events.
This roughly maps to some of DataDevice's receiving methods, but by
being abstract
also allows us to use the same code from xwayland in a manner
transparent to all
code paths.
Preivous xwayland support with "proxy surfaces" have been removed.
--
In future it will be extended to have the mouse move events, so that we
can
avoid spying on the seat both in dataDevice and kwin's internal filter
A dataDevice has a request to start a drag with multiple parameters.
As kwayland's goal is to turn an event-driven API into a property cache API we
store this data. This patch moves that storage to the Seat as properties of the
active drag, rather than a property of the data device that happened to
initialise it.
This both helps keep a lot of other logic together, but also allows us to expose
a public startDrag method that can be invoked from Kwin's internal surfaces or
xwayland.
Any properties in DataDevice now relate to data being dropped on the device.
With the aboutToBeDestroyed signal, the compositor will be able to
perform cleanup before the QObject::destroyed signal is emitted, which
saves us some nullptr checks.
Register WL_SHM_FORMAT_ARGB2101010 and its XRGB,ABGR, and XBGR variants.
These (little-endian) formats are only advertised on little endian
machines, where there exist matching (native-endian) QImage formats.
wl_callback and wl_region are two kinds of objects that are frequently
allocated.
Currently, we make two extra heap allocations per each wl_callback
object. One for the wrapper object (FrameCallback) and the other one is
for its Resource.
With this change, no extra allocations will be made. Also, due to
relying on wl_resource linked lists, the destroy listener implementation
got much simpler.
This won't result in huge memory usage or performance improvements, but
still it's worth reducing the number of memory allocations where possible.
Currently, we store all surfaces in a single list and use linear search
to find the SurfaceInterface by its object id and client connection.
With this, we first search for the wl_resource object by its id. Once we
have a wl_resource, SurfaceInterface::get(wl_resource) can be used.
The main advantage of the proposed solution is that we don't need to
maintain a static list with all SurfaceInterface objects.
Display::outputsIntersecting() is used to compute the list of outputs
where the given surface is. The problem is that it accounts for the dpms
mode.
This means that if an output is turned off, clients will receive a leave
event and they may potentially decide to change the buffer scale and
commit new buffers.
The dpms check was introduced to fix a crash, however since then, output
bits in kwin have changed drastically, in particular how wl_output
objects are destroyed. So, it should be safe to remove the dpms check.
A subsurface should be considered mapped only if it has a buffer
attached and its parent is also mapped.
Currently, mapped status logic in SurfaceInterface is somewhat broken
for sub-surfaces. For example, the mapped() signal will be emitted even
if the sub-surface should be considered unmapped according to the spec.
Currently, if an application is closed, all of its shm buffers will be
destroyed. However, the compositor may want to access them to fade out
the window.
With this change, the underlying shm pool will be referenced when a shm
buffer is destroyed. So, the compositor can access buffer data even if
the buffer is destroyed.
Currently, the BufferInterface encapsulates all the kinds of client
buffers. This has become a somewhat annoying issue as we want to
reference the shm pool if a shm buffer is destroyed, or have custom
buffer readiness logic for linux dma-buf client buffers.
Implementing all of that with the current abstractions will be
challenging as there's no good separation between different client
buffer types.
This change splits the BufferInterface class in three sub-classes -
DrmClientBuffer, LinuxDmaBufV1ClientBuffer, and ShmClientBuffer.
In addition to that, this change fixes the broken buffer ref'ing api.