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
Summary:
proxyRemoteSurface is a fake wayland surface created for the drag and
drop between X and wayland clients.
The lifespan is not guaranteed to outlive the DataDevice.
Kwin closes Xwl before the other wayland client connections so it's
technically dangling for a bit when events could be dispatched.
Probably will never happen, but better to guard and be safe.
Test Plan: Compiles
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D22862
Summary:
We can use the cached current mode in one more case. Additionally make it
more explicit what a valid mode is and when to add them.
Test Plan: Relevant autotests pass. KWin Wayland nested and DRM session work.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D23535
Summary:
Instead of looping over all modes for retrieving current mode data copy it
to a separate variable.
Test Plan:
KWin auto tests pass and KScreen in Wayland nested session shows correct
information.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, kde-frameworks-devel
Tags: #frameworks
Maniphest Tasks: T11459
Differential Revision: https://phabricator.kde.org/D23493
Summary: This interface provides a way for clients to create generic dmabuf-based wl_buffers.
Test Plan: Works with weston-simple-dmabuf-drm and weston-simple-dmabuf-egl in KWin.
Reviewers: #kwin, #plasma, graesslin, davidedmundson, mart, fredrik
Subscribers: zzag, kde-frameworks-devel, romangg, plasma-devel
Tags: #frameworks, #plasma_on_wayland
Maniphest Tasks: T8067
Differential Revision: https://phabricator.kde.org/D10747
Summary:
So far we've been copying protocol specifications from wayland-protocols
repo to kwayland repo. The main issue with copying is that we have to
keep xml files in sync manually. A better approach would be to use xml
specs straight from wayland-protocols package.
Test Plan: Compiles.
Reviewers: #kwin, #frameworks, romangg, davidedmundson
Reviewed By: #kwin, romangg, davidedmundson
Subscribers: davidedmundson, apol, romangg, asturmlechner, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D22216
Test Plan: Tested with both the lock screen and the keyboard indicator plasmoid
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D20191
Summary:
So far not all v5 features were implemented because most of them are
optional. But given that XWayland needs axis_discrete event maybe it's
time to implement them.
CCBUG: 404152
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, mthw, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D18933
Summary:
Used by clients to say where their true window geometry is relative to
the buffer size. Important if a client has client side shadows which
shouldn't be included for positioning tasks.
Technically this should be double buffered, but for consistency with all
other XdgShell properties this will be a task left to ShellClient.
Test Plan: Unit test
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: zzag, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D20595
Summary:
Missing from our surface handling was the damage_buffer call introduced in
version 4 of the wl_compositor interface.
Its only difference to a normal damage call is that the damaged region is
supposed to be defined by the client in buffer coordinates instead of
surface coordinates. This damage must be tracked separately in KWayland
and on commit with the buffer transformation united with the normal damage.
Test Plan: Autotest updated.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, zzag, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D15910
Summary:
This implements a wrapper class for the wl_eglstream_controller Wayland
interface. It allows clients to inform the compositor when a new EGL Stream has
been created with an Wayland surface attached as its producer. The compositor
can then bind a GL texture as the stream's consumer allowing it access to the
surface's buffer contents for presentation. The only client currently expected
to make use of this interface is the NVIDIA EGL driver when running alongside a
compositor supporting EGLStream-based buffer sharing.
Reviewers: #kwin, romangg, davidedmundson
Reviewed By: #kwin, romangg, davidedmundson
Subscribers: kde-frameworks-devel
Tage: #frameworks
Differential Revision: https://phabricator.kde.org/D18824
Summary:
We have 4 events:
buffer1 created
buffer2 created
buffer1 paramters sent
buffer2 paramters sent
Some are batched
We should connect to buffer 1's parameters being sent after the first
buffer is recieved, not in the potential event loop waiting for buffer
2.
Test Plan:
Passes locally
Haven't tested on build.k.o
Reviewers: #kwin
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D19476
Summary:
XdgOutput no-ops if one calls setLogicalSize(someSize) and someSize
matches the last sent size
However, as we have an explicit done signal, we currently end up sending
this regardless.
This patches tracks if we've made any changes to commit in the done
event.
CCBUG: 400987
Reviewers: #kwin, romangg
Reviewed By: #kwin, romangg
Subscribers: romangg, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D19255
Summary: For remote desktop support, we need to move with the pointer using absolute positin.
Test Plan: I tested this with xdg-desktop-portal-kde and krfb and it worked.
Reviewers: davidedmundson, graesslin, zzag
Reviewed By: davidedmundson, zzag
Subscribers: graesslin, zzag, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D18114
Summary:
Whilst some interfaces that are double-buffered against the wl_surface
are proxied through SurfaceInterface, some are not, most notably
XdgShell.
We need some low level signal to know when the surface has been
committed which doesn't rely on their being a damaged buffer.
Test Plan:
Unit test
Used in kwin
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: zzag, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D18582
Summary:
Allows a compositor to set a proxy surface to handle drag and drop
operations place of the actual surface the drag originated from.
One proxy surface can handle multiple origin surfaces at the same time. These
need to get registered once. The active remote surface gets set when a pointer
button is pressed on the surface.
Test Plan: Manually with KWin's Xwayland DnD patches.
Reviewers: #kwin
Subscribers: davidedmundson, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D15421
Summary: This signal notifies a compositor about selection changes on a seat.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D15023
Summary:
testWaylandSeat fails because the seat interface generates incorrect id
for the second touch.
Test Plan: testWaylandSeat passes.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D18628
Summary:
In rare cases testWindowmanagement fails because the initial iconChanged
signal gets emitted after setIcon is called.
Reviewers: #kwin
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D18421
Summary:
Right now it worked in kwin, but was in fact breaking the spec sending
buffers before it was configured.
There also seems to be an unclearly written (but very very sensible)
rule about comitting the surface after initial properties in order to
recieve the configure event.
After these changes it works in Weston too.
Test Plan: Ran test in kwin_wayland and weston
Reviewers: #kwin
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D18577
Summary:
If automaticSocketNaming is enabled, it will use wl_display_add_socket_auto
to allocate the next free socket. The resulting name can be retrieved using
socketName after a successful start afterwards.
Test Plan: Ran the new autotest, passes. kwin_wayland still uses the old behaviour.
Reviewers: #kwin, #plasma, romangg
Reviewed By: #kwin, #plasma, romangg
Subscribers: davidedmundson, zzag, romangg, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D17122
Summary:
in order for the pager to work correctly and not having to use a weird mix of wayland and dbus apis, the rows
number needs to be in the protocol
Test Plan: new passing autotest
Reviewers: #plasma, #kwin, davidedmundson
Reviewed By: #plasma, #kwin, davidedmundson
Subscribers: zzag, davidedmundson, hein, kde-frameworks-devel
Tags: #frameworks
Maniphest Tasks: T4457
Differential Revision: https://phabricator.kde.org/D17691
Summary: We have to wrap these two requests just for convenience.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D18440
Summary:
A client (kscreen-doctor especially) can disconnect whilst kwin still
has an instance.
Test Plan:
Had reproducible crash on kscreen-doctor.
Now don't.
Reviewers: #kwin
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D18248
Summary:
Usual massive boilerplate.
Should allow us to remove the injection in our QPT, as Qt 5.12 implements
this protocol directly. Will probably be relevant for other toolkits as
it's more standardised than our custom one.
Client is mostly 1:1 with the protocol, server side has some tweaking to
fit with kwayland turning an event based API into a state based one.
Test Plan:
Relevant unit test
Tried in modified kwin with our QPT disabled
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: zzag, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D17498
Summary:
The touch related code in the seat interface class has been for no apparent
reason very different to pointer and keyboard code.
This patch makes touch related code more similar and by that allows a client
to receive touch events through multiple interfaces.
Test Plan: Manually and auto tests still pass.
Reviewers: #kwin, #frameworks, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D15443
Summary:
VirtualDesktops with the new plurality was added PlasmaWindowManagement,
but PlasmaWindowModel was left unchanged.
In behavioural changes, setting a window to be on all running desktops
should not mark it as being set on all desktops, they are 2 distinct
pieces of information.
Test Plan: Relevant unit test
Reviewers: #kwin, mart
Reviewed By: #kwin, mart
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D16883
Summary:
Before we send the data we don't know what desktop a client is on.
It used to be neither on all desktops nor on any desktop, a corrupt
state.
After the virtual desktop changes the data will will indicate that we're
on all desktops until we're told otherwise, which is at least a valid
state.
Test Plan: Ran test
Reviewers: #kwin, mart
Reviewed By: #kwin, mart
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D16880
Test Plan: Valgrind was quieter on the virtual desktop test
Reviewers: #kwin, mart
Reviewed By: #kwin, mart
Subscribers: mart, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D16877
Summary:
QList::erase will move the data underneath where the iterator is
pointing, we want to delete the entry we're about to remove from the
list.
Test Plan: Relevant tests now behave better
Reviewers: #kwin, broulik
Reviewed By: broulik
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D16885