If the source rectangle is not set, we need to use the surface size
given by the attached buffer. It's computed as buffer size / scale, but
the buffer can also be transformed. In other words, we need to compute
the natural surface size as follows - buffer size / scale and transpose
the result if the buffer is rotated 90 or 270 degrees.
Usually, a client will only use text input v2/v3. Do not return the focused
surface for text input if it has no relevant text input resource.
If text-input object is created after surface get the focus, send
enter to this text input object. Ensure sendEnter and sendLeave always
appear in pair.
Also, use the same technique in text-input-v2 for text-input-v3 to
handle per resource's enable/disable state, and only send update to
enabled text-input-v3 object.
Currently drag-and-drop doesn't work on FreeBSD because relevant input
parts of kwayland-server are not compiled there.
HAVE_LINUX_INPUT_H is set to 0 on FreeBSD because linux/input.h is in
/usr/local/include and check_include_file() doesn't look there.
Regardless of that, as FreeBSD developers pointed out, including
linux/input.h is the recommended way to get input event codes so let's
make it a hard dependency.
dmabuf-feedback allows the compositor to give the client feedback on what
formats and modifiers are best to use, and for which devices it needs to
allocate its buffers, which improves performance and efficiency.
Reusing the pointer transformation causes drag with touch to send
completely incorrect coordinates. So implement the "TODO" item about
surface transformation for touch, so we send correct drag events for
touch.
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.