Summary:
Firefox has two wl_data_devices. One in firefox code one in GTK code.
Both need to get data offers.
I've left handling the case for multiple data devices and drags to make
this patch feasible to put into 5.19 and I didn't want to make this
patch invasive.
Test Plan:
Firefox in wayland
WAYLAND_DEBUG=1 firefox |& grep data
Shows now both created devices get offers
Also I can paste
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: meven, ngraham, zzag
Differential Revision: https://phabricator.kde.org/D29720
Summary:
Firefox has two wl_data_devices. One in firefox code one in GTK code.
Both need to get data offers.
I've left handling the case for multiple data devices and drags to make
this patch feasible to put into 5.19 and I didn't want to make this
patch invasive.
Test Plan:
Firefox in wayland
WAYLAND_DEBUG=1 firefox |& grep data
Shows now both created devices get offers
Also I can paste
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: ngraham, zzag
Differential Revision: https://phabricator.kde.org/D29720
Summary:
In KWin, we need to know when a sub-surface becomes mapped or unmapped
so we can generate or filter out window quads for the sub-surface.
Reviewers: #kwin, davidedmundson, apol
Reviewed By: #kwin, davidedmundson, apol
Differential Revision: https://phabricator.kde.org/D29256
This reverts commit 78a8b6877c.
Despite being a useful fix for an important crash it forces a dependency on
libwayland 1.8, which some distros don't have.
Summary:
Removes the Global from the registry, but does not delete the underlying
wl_global
Removal of a global is racey in wayland.
A client could be trying to bind at that moment.
Typically globals are static for the lifespan of the compositor, however
there are exceptions
For those cases this call will can remove the global from the registry,
but still keep the wl_global instance alive
and handling bind requests.
The compositor can then remove the Global wrapper (this object) deleting
the wl_global after an arbitrary delay or
keep it around for re-use for the duration of the compositor.
Test Plan:
Unit test
Made blur global outlive BlurEffect - no longer disconnects plasma on config changes
Reviewers: #plasma, apol
Reviewed By: apol
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D28883
Summary:
These signals can be very useful when one wants to monitor changes in a
sub-surface tree.
Reviewers: #kwin, apol
Reviewed By: apol
Subscribers: apol, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D27860
Summary:
In this test we are waiting on 4 events. 2 things via 2 threads. It was
unstable.
This patch avoids hardcoding a bunch of ifs() handling recieving
different orders, by waiting for both events.
We can't use QTRY_COMPARE as ConnectionThread does magic things with
QCoreApplication::eventDispatcher which don't work quite the same.
This is a bit of a shot in the dark. It passes 100% of the time locally,
lets see what CI manages to do :)
Test Plan: Ran test :)
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: zzag, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D28892
Summary:
Remove unused variables and members.
We were often storing the q of classes without ever needing them. I'd
just do it when it's useful. We do it in the private class so it can
always be added, removes boilerplate code.
Don't use std::move when returning temporary QImage. The compiler is
smart enough to know to do it but produces the warning "moving a
temporary object prevents copy elision".
Remove unused lambda captured variables.
Test Plan: Getting much cleaner build logs
Reviewers: #frameworks, #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: zzag, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D28442
Summary: Like we did on kwin, it doesn't work.
Test Plan: This very patch
Reviewers: #frameworks, davidedmundson
Reviewed By: davidedmundson
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D28309
Summary: Otherwise events are dispatched from the wrong thread.
Test Plan: Let's see if Jenkins to see if it hits that race condition again
Reviewers: #kwin
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D28263
Summary:
We hit this if we run an old kwin against new kwayland.
Kwin won't set the name so it's empty, so we'll call
zxdg_output_v1_send_name with an empty string
QtWayland will see that we receive this and update mOutputName to an
empty string which causes client issues.
Reviewers: #kwin
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D28245
Summary:
Will be useful for making plasma widgets not move about
on multi monitor. QtWayland already supports it
Test Plan: Unit test
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: apol, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D27535
Summary:
Previously, KWayland wasn't hanging onto the application menu
to broadcast it when registering a resource. This fixes that.
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: kde-frameworks-devel, zzag
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D28168
Test Plan: See that the test works as expected.
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D28164
Summary:
Implements the necessary classes to have proper support for the tablet and pen.
Doesn't implement yet the ring/slider/totem bits.
Test Plan:
Used it with Plasma and GTK clients, together with the kwin patch I'll submit soon.
https://youtu.be/GGx0TlNJlzs
Also I added a test.
Reviewers: #kwin, #frameworks, zzag, davidedmundson
Reviewed By: #kwin, zzag, davidedmundson
Subscribers: davidedmundson, zzag, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D26858
Summary:
The spec says nothing about the order between damage_buffer and attach
requests.
Test Plan: Firefox doesn't become frozen. Although there are still issues with resizing.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D28147
Summary:
To better isolate the clients from each other eachh KeyboardInterface
creates it's own dedicated temporary file and sends the fd for this
temporary file to the client. This means the memory for the keymap is no
longer shared between all clients, every client has an own copy.
To support this the existing API to set the keymap is deprecated and
replaced by a new method setKeymapData which takes the content of the
keymap as a byte array. The now deprecated method which takes a file
descriptor is changed to use the new setKeymapData method. For that it
reads the content of the file.
The implementation in KeyboardInterface to create the file descriptor is
based on the implementation of KWin. As I implemented the change in KWin
(see 3b4c508ee3) it is not a problem from
GPL vs LGPL perspective.
The change includes test cases to verify that the content of the keymap
is properly passed to the client and that the memory is no longer shared.
BUG: 381674
Reviewers: #kwin, #frameworks, davidedmundson, zzag
Reviewed By: #kwin, zzag
Subscribers: plasma-devel, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D14910
Summary:
The new method provides a convenient way for determining the rectangle
that bounds the given surface and all of its sub-surfaces. This can be
very handy when determining the effective window geometry.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: apol, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D27828
Summary:
This patch adds an interface allowing a compositor to send
the service name and object path of a PlasmaWindow's application menu
to the client.
Reviewers: #kwin, zzag, davidedmundson
Reviewed By: #kwin, zzag, davidedmundson
Subscribers: davidedmundson, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D27464
Test Plan:
Unit test
Will be tested by hotspots in drag icons
Reviewers: #kwin
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D27190
Summary:
We want surfaces with a notification role to be able to switch ability
to take focus or not on the fly. The semantics are identical as the
panel
taking focus, we may as well re-use what exists and remove the implicit
limitation than re-invent the wheel and complicate things.
Test Plan: Docs
Reviewers: #kwin, romangg
Reviewed By: #kwin, romangg
Subscribers: romangg, apol, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D26175
Summary:
The dmabuf implementation should be managed by the compositor and not by the
interface which might go away through signals while the implementation goes
away in the compositor simultaneously.
Test Plan: Compiles.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D25576
Summary:
So far all double-buffered properties in our implementation of xdg-shell
weren't actually double-buffered. When a property setter is invoked, we
pray to the God hoping that the client committed associated surface.
This change introduces private SurfaceRole class. The new class provides
a way for SurfaceInterface to commit pending state of associated shell
surface.
The chosen architecture allows us to do more in the future. For example,
we could use SurfaceRole to prevent associating several roles to a single
wl_surface object, e.g. xdg-toplevel to a pointer surface, etc.
Test Plan: This change breaks support for client-side decorated clients in KWin.
Reviewers: #kwin
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D23745
Summary: Adds support for keyboard button press and release as defined in linux/input-event-codes.h
Reviewers: davidedmundson, apol, #plasma, romangg
Reviewed By: davidedmundson, #plasma
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D23766
Summary:
Allows
* projects linking to KWayland to hide deprecated API up to a
given version or silence deprecation warnings after a given version,
using
* -DKWAYLAND_DISABLE_DEPRECATED_BEFORE_AND_AT
* -DKWAYLAND_NO_DEPRECATED
* -DKWAYLAND_DEPRECATED_WARNINGS_SINCE
* -DKWAYLAND_NO_DEPRECATED_WARNINGS
or
* -DKF_DISABLE_DEPRECATED_BEFORE_AND_AT
* -DKF_NO_DEPRECATED
* -DKF_DEPRECATED_WARNINGS_SINCE
* -DKF_NO_DEPRECATED_WARNINGS
No support for "EXCLUDE_DEPRECATED_BEFORE_AND_AT", needs to be done by
someone with detailed knowledge about disabling implementation, if wanted.
Reviewers: #kwin
Subscribers: zzag, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D24663
Summary: Adding further files is confusing, since the list is almost alphabetical.
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: zzag, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D24002
Summary:
Some of the documentation did not say what the purpose of the
respective class was, but rather gave a tautology.
For people new to the code base it helps to mention that
DPMS is power management.
That DataDevice is for copy-and-paste and drag-and-drop is
maybe obvious to people used to X11 API, but not very clear
to most others.
When first reading the KWayland code, some explanations
help getting around.
Reviewers: #kwin, romangg
Reviewed By: #kwin, romangg
Subscribers: romangg, zzag, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D23915
Summary: When this is not used, there is no point in capturing it.
Reviewers: #kwin, zzag, broulik
Reviewed By: #kwin, zzag, broulik
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D23916