Currently, if a wp_viewport upscales the surface but doesn't set the
source rectangle, the surface-to-buffer matrix will be calculated
incorrectly.
If the source rect is not set, we need to calculate the source size
based on the buffer size and compare it with the destination size. If
the two are not the same, add a scale transform.
BUG: 445346
With the EGLStreams support gone, we can restore the correct type check
for wl_drm client buffers. The spec suggests to query the
EGL_TEXTURE_FORMAT attribute to determine whether the specified wl_buffer
is a wl_drm buffer.
When binding we just need to be talking to the one client to make sure
it's set up. This saves us from waking up every other process only to
realise that nothing happened.
With some apps, firefox specifically, it's possible to enter a dnd
positive feedback loop, e.g.
* kwin sends wl_data_offer::action event
* the app reacts to it and calls wl_data_offer::set_actions() with the
same actions
* kwin re-sends the wl_data_offer::action event because
DataOfferInterface::dragAndDropActionsChanged() has been emitted
* the app calls wl_data_offer::set_actions() again, and so on...
This should make D&D in Firefox more responsive.
The plasma window management protocol is intended to be used by
plasmashell. Since kwin and plasmashell have the same release cycle, we
know that the legacy virtual desktop stuff is unused so it can be
dropped to simplify code.
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.