Summary:
Requests
* reset
* commit_state
* invoke_action
are used in text-input v0 only and neither in v2 and upcoming
v3 of the unstable text-input protocol.
To increase readability put their callbacks in v0 interface class only.
Test Plan: Compiles
Reviewers: #kwin, #frameworks, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D16673
Summary:
Implement the virtual desktop protocol discussed in
T4457 xml protocol, client and server part.
The PlasmaVirtualDesktopManagement interface manages the desktops
instantiation and layout, each desktop is a PlasmaVirtualDesktop
instance which contains unique id, name and position.
PlasmaWindow has new events: plasmaVirtualDesktopEntered
and plasmaVirtualDesktopLeft when a window enters or leaves a desktop,
and desktops as the list of desktops is in. A window can be on
any subset of desktops, if the list is empty, it's considered on all desktops.
Test Plan: Autotest
Reviewers: #kwin, #plasma, graesslin, hein, davidedmundson
Reviewed By: #kwin, #plasma, davidedmundson
Subscribers: davidedmundson, zzag, bshah, romangg, kde-frameworks-devel
Tags: #frameworks
Maniphest Tasks: T4457
Differential Revision: https://phabricator.kde.org/D12820
Summary:
A data source can disappear at any moment, it's plausible a client could
have requested data whilst the client was alive and we are processing it
afterwards.
The accept and finish callback guard against the source being deleted,
but recieve did not.
BUG: 400311
Test Plan: Could still copy/paste as before
Reviewers: #kwin, romangg
Reviewed By: #kwin, romangg
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D16431
Summary:
KWayland takes always the top-most child surface at a given position for its
pointer input. But if a sub-surface sets its input region, it should not select
this one when the position is out of its input region, but rather try the
surface below.
Test Plan:
My testing was only on my Xwayland branch. Supposed to also fix a problem
with Firefox native Wayland port.
Reviewers: #frameworks, graesslin, davidedmundson
Reviewed By: davidedmundson
Subscribers: davidedmundson, zzag, kde-frameworks-devel, graesslin, plasma-devel
Tags: #frameworks, #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D7038
Summary:
This allows a dev to move the window before creating the popup which
is extremely useful in testing constraints. Also makes it very easy to
mod this code into a grabbing popup for other tests.
This patch also improve the painted surfaces to show the anchor rect
around where we place the popup which is easier for visual debugging.
No library code changes
Test Plan:
Ran the test
KWin doesn't position the popup according to all constraints
Soon will
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: zzag, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D16294
Summary:
Firefox sends
wl_surface@37.damage(0, 0, 808, 622)
wl_surface@37.attach(wl_buffer@34, 0, 0)
Which we silently treat as an error.
There's nothing in the spec to forbid this. The only thing that matters
is the state on commit. This moves a check there.
CCBUG: 397834
Test Plan:
Had a debug in there which was being activated
Gets firefox slightly further (but not complete)
Reviewers: #kwin
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D15912
Summary:
Returning early would mean that SeatInterface::Private::touchInterface.ids
does not contain the id. Then the assert would fail in touchUp at some
point later when called by the compositor.
Reviewers: #kwin, #frameworks, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D15468
Summary:
If a client has not bound a certain output do not directly return
but try to deliver the buffer to other clients.
If none of them has requested it, send bufferReleased signal
immediately to let compositor know that the buffer should
be cleaned up.
Test Plan: Manually. Autotest planned.
Reviewers: #kwin, #frameworks, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: jgrulich, davidedmundson, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D15422
Summary: An internal drag is without data source. Still we tried to create offers.
Test Plan: This change makes the updated autotest in D15072 pass without errors.
Reviewers: #kwin, hein
Reviewed By: hein
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D15074
Summary:
A drag start request should be dismissed when the client does not have an
implicit pointer grab or the currently focused pointer surface is not the
origin. The conditions for that were wrong in the past.
Also just ignore the request and not post directly an error, that potentially
kills the client since by concurrency the client might have send a valid
request, that got invalidated through grab or focus change at the same time
on the server side.
Test Plan: Manually and autotest.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: adridg, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D15072
Summary:
Currently whenever a single client binds we would incorrectly send an
EDID/uuid/enabled update to every client.
This syncs every property into following the same set/send/update
pattern everywhere.
Test Plan: Existing unit tests
Reviewers: #kwin, romangg
Reviewed By: #kwin, romangg
Subscribers: romangg, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D14505
We now have one extra method so we get one more change event so count in
this test needs updating.
Ideally we should only update once; this test was written hardcoding the
values that currently happen rather than what should happen; but that's
a commit for another day.
Summary:
Extends the output device and output configuration interfaces with the
ability
to query and set the RGB color intensity curves (gamma ramps) of the
associated output.
Test Plan: Manually. Auto tests will be added to this diff soon.
Reviewers: #frameworks, graesslin, romangg
Subscribers: kde-frameworks-devel, graesslin, davidedmundson, zzag,
cfeck
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D12388
Summary:
There was no destructor in the protocol, which meant the auto generated
_destroy function only deletes the wl_proxy object, but doesn't actually
send anything to the server.
Result was OutputConfiguration objects on
the server just linger forever and it's a broken state
Test Plan: Added unit test that objects have the lifespan they should do
Reviewers: #kwin, romangg
Reviewed By: #kwin, romangg
Subscribers: romangg, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D13730
Summary:
The current code used the same outputInterface between all tests, with
data and outdated connections slowly accumulating.
This meant most the code didn't work as it was intended, for
example testExampleConfig had the config applied from the connect in the
previous test. It just happened to pass.
This resets everything between each test.
Test Plan:
Can now add a test without going insane
Existing tests still pass
Reviewers: #kwin, romangg
Reviewed By: #kwin, romangg
Subscribers: romangg, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D13729
Summary:
In order to have fractional scaling in kwin, we need to communicate it with
kscreen, which means changing the data type in our config protocols.
This introduces a new method on outputdevice and outputconfiguration
to set/request scale as a float.
wl_output is and should remain unchanged as an int
No urgent rush for reviewing/merging this as it's useless without other changes.
Test Plan: Attached unit tests
Reviewers: #kwin, romangg
Subscribers: romangg, zzag, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D13601
Summary:
The destructor or Resource::~Resource will delete the d-pointer used by
Resource before we reach QObject::~QObject() of the resource which emits
the destroyed signal. This means this lamba is accessing deleted
contents.
Based on
https://build.kde.org/view/Frameworks/job/Frameworks%20kwayland%20kf5-qt5%20SUSEQt5.10/71/testReport/
aboutToBeUnbound is emitted before object destruction.
Test Plan: Relevant unit test still passes and this lambda is still invoked.
Reviewers: #kwin, romangg
Reviewed By: #kwin, romangg
Subscribers: romangg, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D14291
Summary:
Implement support for locked pointer cursor hints. Cursor hints can be
retrieved by the compositor either continuously by connecting to the
cursorHintChanged signal or only when needed. In the later case the
compositor must connect to the aboutToUnbound signal of the locked pointer
interface in order to fetch the last hint before the interface is unbound.
Test Plan: Autotest added.
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, kde-frameworks-devel
Tags: #frameworks
Maniphest Tasks: T4692
Differential Revision: https://phabricator.kde.org/D14175
Summary:
Several signal spies, which were supposed to fail, were waiting for the
default 5 seconds, which is most often unnecessary long.
This patch sets a time limit of 500ms in suitable cases. Reduces for me
the total test time by 40%.
Test Plan:
Before (with fixed seat and selection tests):
98% tests passed, 1 tests failed out of 45
Total Test time (real) = 173.31 sec
The following tests FAILED:
19 - kwayland-testWindowmanagement (Failed)
After:
98% tests passed, 1 tests failed out of 45
Total Test time (real) = 102.12 sec
The following tests FAILED:
19 - kwayland-testWindowmanagement (Failed)
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D14184
Summary:
The seat test is broken since 312298e2f6, because a frame event now
also follows a relative pointer motion.
The selection test is broken since d3f15a5388, because clearing a selection,
which never has been set, is a noop now.
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D14183
Summary:
This adds XDG WM Base (essentially XDG Shell v7/stable edition) into our
existing XDGShell classes which wrap v5, v6 and now this.
It's mostly copy and paste from V6 except for the enum types for gravity
and anchor edges on positioners.
There's been no attempt to share code with V6 as realistically that
won't get updates whereas XDGWMBase will; and at some point we will
want to drop V6 without things being too tangled.
Test Plan:
Same test suite as V6 has
Compiled GTK master and ran against suitably modified kwin
running WAYLAND_DEBUG=1 gtk-demo showed we were using this interface
Everything worked as well as V6 does.
Reviewers: #kwin, romangg
Reviewed By: #kwin, romangg
Subscribers: romangg, zzag, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D13510
Summary:
When we add WMBase (the new name stable XdgShell) we get a clash with
XDGShellV5. This clash consists of all functions in the generated C file
which clashes at linker time, as well as multiple xdg_blah_interface
structs which would get redefined.
XDGShellV5 in practice is used by literally no-one (Qt never defaulted
to it if wl-shell was available) and has been dropped from GTK when
they added v6. But it's used by some kwin unit tests so breaking
would cause issues for stable kwin release tests... so it's a pain.
We can't mod the XML as we need the strings sent down the wire to remain
the same and we need the same names for our forward declared structs
that the client code can cast to.
This patch copies the generated files and modifies them manually.
Hacky, but we know this code will never change again - and IMHO this
task isn't one worth investing too much time into.
Test Plan:
Finished my XDG WM Base patch (see next phab) and things compile \o/
Unit test still passes
Ran: QT_WAYLAND_SHELL_INTEGRATION=xdg-shell-v5 dolphin --platform wayland and verified it worked
Reviewers: #plasma, romangg
Reviewed By: #plasma, romangg
Subscribers: romangg, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D13488
Summary:
- selfInitialization
- memleak
I could probably suppress the selfInitialization warning, but probably
is cleaner this way. Opinions welcome. This also fixes the memleak in
autotest.
Test Plan:
- arc lint --everything
- Fix issues
- build
- run tests
Reviewers: #frameworks, aacid
Reviewed By: aacid
Subscribers: apol, aacid, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D13559
Summary:
This solves for me not working relative pointer motion with grab/lock in
Xwayland applications.
Looking at the Xwayland code it is clear, that it expects a frame event on
wl_pointer versions 5 and above after relative motion events. wl_pointer
version 5 support was added to KWayland in c29035a6.
If the cursor is locked no absolute motion events are sent. In this case to
make sure relative motion events are processed by the client, send the frame
event after every relative motion.
BUG: 395815
Test Plan: Manually with Neverball in Xwayland mode.
Reviewers: #plasma, #kwin, #frameworks, davidedmundson
Reviewed By: #plasma, #kwin, davidedmundson
Subscribers: davidedmundson, kde-frameworks-devel
Tags: #frameworks
Maniphest Tasks: T8923
Differential Revision: https://phabricator.kde.org/D13257
Summary:
We had a data funciton...then didn't use it, effectively skpping half of
the point of the test.
Test Plan: Ran the test
Reviewers: #kwin, mart
Reviewed By: #kwin, mart
Subscribers: romangg, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D13495
Summary:
GTK applications seem to call wl_data_device::set_selection multiple times with
the same wl_data_source object, replacing it with itself. If we cancel it, they
will destroy it and the selection will be gone.
With this patch it is again possible to copy from GTK applications.
BUG: 395366
Test Plan: Patch provided by the reporter, he reported success.
Reviewers: #plasma, #frameworks, romangg
Reviewed By: #plasma, romangg
Subscribers: michalsrb, romangg, graesslin, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D13535
Summary:
- xml linter to make sure that we don't add broken protocols
- merge-conflict so that we don't commit merge-conflict markers
- spell check for documentation
- cppcheck to check the code
Test Plan: broke some files manually, and then ran arc lint
Reviewers: #frameworks, mart
Reviewed By: mart
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D13533
Summary:
Use lambda function to reduce code duplication and put
function definitions in the same order as in the header file.
Test Plan: All autotests succeed.
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D13191
Summary: Not released yet.
Test Plan: No testing performed at all.
Reviewers: #plasma, stikonas
Reviewed By: stikonas
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D13377
Summary:
Interfaces must be cleaned up correctly and client proxys
destroyed. Otherwise we get a memory corruption.
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D13190
Summary:
Adding "SkipSwitcher" to API, as a result of discussion in
BUG 375921
Depends on / related to D11924 and D11926.
Reviewers: hein, graesslin
Reviewed By: graesslin
Subscribers: kde-frameworks-devel, lbeltrame, rikmills, davidedmundson, #plasma, graesslin
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D11925
Summary:
Done primarily for XWayland which for legacy reasons doesn't assume the
logical size of a display is pixelSize / outputScale. Meaning xwayland
windows that position themselves are wrong in a scaled environment.
It also allows the possibility for us to support fractional scaling
whilst keeping wl_output::scale as an integer.
The protocol is a bit odd as it operates via the FooManager + Foo
pattern rather than using globals like Output so I've wrapped it so it
behaves more like globals.
Test Plan: #plasma
Reviewers: romangg
Subscribers: #frameworks
Tags: #frameworks
Maniphest Tasks: T8501
Differential Revision: https://phabricator.kde.org/D12235
Summary:
This change implements the required changes for wl_seat version 5.
There seem to be applications which require version 5 and refuse to
start if the server doesn't provide it. Thus we need to provide it.
The main difference with version 5 is that pointer need to send a
frame event after each logical group of events. As we don't support the
new events from version 5 yet, we just emit the frame after each event
and implement the suggested semantics for the enter/leave behavior.
To really make use of this, we will have to implement additions in the
API and then in KWin to expose the new API elements. But to just support
the semantics we don't need it.
BUG: 389189
FIXED-IN: 5.45
Test Plan: Extended autotest
Reviewers: #kwin, #plasma, #frameworks
Subscribers: plasma-devel
Tags: #frameworks, #plasma
Differential Revision: https://phabricator.kde.org/D10235
Summary:
Previously KWin supported only version 2 of wl_output interface
In third version there was an important addition that allowed clients to
unbind outputs they may previously have bound.
Bumping versions in both client and server part of KWayland to support
this behaviour.
Reviewers: davidedmundson, graesslin
Reviewed By: graesslin
Subscribers: jgrulich, #frameworks
Tags: #frameworks
Maniphest Tasks: T7785
Differential Revision: https://phabricator.kde.org/D10929
Summary:
This addresses the following situation:
1. Start drag on a QtWayland based window
2. Press escape
3. Release mouse
-> this results in a crash. The main reason for this is that QtWayland
destroys the DataSource in step 2 and KWayland did not expect this at
all. The drag and drop operation continued and results in step 3 in the
drag target to request data from the no longer existing DataSource.
This change addresses the root of the problem by cancelling the drag
operation when the DataSource gets destroyed.
BUG: 389221
FIXED-IN: 5.44
Test Plan:
New test case exposing the problem and manual testing with
kwin_wayland and dolphin (based on bug report)
Reviewers: #frameworks, #kwin, #plasma
Subscribers: plasma-devel
Tags: #frameworks, #plasma
Differential Revision: https://phabricator.kde.org/D10142
Summary:
Qt seems to damage and commit child subsurfaces although their parent
got destroyed. This actually doesn't make any sense as without a parent
surface they cannot be shown. But nevertheless we should not crash in
such a situation.
This change guards the places in the commit handling code where the
parent gets accessed.
BUG: 389231
Test Plan: New test case which exposes the problem
Reviewers: #frameworks, #kwin, #plasma
Subscribers: plasma-devel
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D10300
Summary:
It's kept separate in case we ever merge the server decoration manager
interface upstream, and this is too kwin specific to have in a
potentially shared spec.
Code is a copy+paste of existing boilerplate.
Replaces use of the deprecated qt extended surface.
I'd like to target 5.42 as otherwise we'll have a regression when we
release Plasma 5.12 as Qt's XDGv6 doesn't have a working qt extended
surface.
Test Plan: Attached unit test
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: plasma-devel, #frameworks
Tags: #frameworks, #plasma
Differential Revision: https://phabricator.kde.org/D9599
Summary:
So far only the client was able to simulate user activity. This new
method allows the server to also simulate user activity on all created
idle timeouts. This is required by KWin to prevent idle timeouts when
the user interacts through KDE Connect's virtual touchpad. In that
situation the mouse pointer is used without updating the input time
stamp as it doesn't come from "real" input devices and thus the idle
timeout prevention is not activated.
Reviewers: #frameworks, #plasma, #kwin
Subscribers: plasma-devel
Tags: #plasma_on_wayland, #frameworks
Differential Revision: https://phabricator.kde.org/D9510
We should only enforce the check whether a data source has set the
actions for drag on drop on a selection if it's at least version 3. For
backward compatibility we used to set a default action which would
ensure that a version <3 and >3 client can interact with each other. But
due to that the action was set to a default value which breaks any
selection. Sorry about that.
This change ensures the backward compatibility behavior does not break
selection.
As the regression causes all clients to quit it is a severe regression
which requires fast action. Due to that I'm doing a maintainer push
without review. I encourage everyone to do a post commit review.
Sorry for not noticing the regression before. The backward compatibility
was the last thing I added in that patch set and apparently I did not
run all tests again.
Summary:
The main difference compared to version 2 is additional drag and drop
actions. The source and destination can negotiate whether the data
should be copied or moved or the user should be asked for either or.
This seems to be important for GTK, but is not yet implemented in Qt.
The main motivation for adding support is that it is required by SDL to
launch on Wayland.
BUG: 386993
Test Plan: Extended test case, sdl apps now start
Reviewers: #frameworks, #plasma, #kwin
Subscribers: plasma-devel
Tags: #plasma_on_wayland, #frameworks
Differential Revision: https://phabricator.kde.org/D9136
Summary:
m_imported was parented to the TestForeign class, which lasts for all
the tests. This caused an error on teardown.
Test Plan: Ran with ASAN. Finally everything passes!
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: plasma-devel, #frameworks
Tags: #frameworks, #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D9407
Summary:
Internally XdgForeign has some delete laters
If we clean up the connection immediately we delete them after we kill
the connection resulting in an error.
Kwin isn't going to tear down the connection in response to a resource
unbinding so we can just fix the test.
Test Plan:
Compiled with ASAN
Got further
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: plasma-devel, #frameworks
Tags: #frameworks, #plasma
Differential Revision: https://phabricator.kde.org/D9406
Summary:
This test deletes the client wayland connection.
We then finish the test and call test cleanup which
releases m_idleInhititManager.
Calling release after the connection is destroyed is an error.
Hence the explicit destroy.
Test Plan:
Built tests with ASAN
No more crash
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: plasma-devel, #frameworks
Tags: #frameworks, #plasma
Differential Revision: https://phabricator.kde.org/D9402
Summary:
A protocol that attaches to a surface and contains two strings which can
change.
The intended use is for clients to link a DBus Appmenu object with a
surface.
This is in preparation for the Qt Extended Surface deprecation which
currently handles this in Kwin.
Test Plan: Attached unit test
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: broulik, graesslin, plasma-devel, #frameworks
Tags: #frameworks, #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D8919
Summary:
The current code captures a char* from a wayland event in a lambda.
By creating the QString first when we capture that by value we'll
implicitly shallow copy it.
The other issue was
someHash.erase(it);
*it->foo();
Even though where the iterator points to is still valid, the iterator
itself is an object that gets modified in erase which ASAN didn't like.
Test Plan:
Ran test.
Those particular errors went away
Tests passed
Subscribers: plasma-devel, #frameworks
Tags: #plasma_on_wayland, #frameworks
Differential Revision: https://phabricator.kde.org/D9319
Summary: This test needs the weston executable. Skip the test if the program wasn't found.
Reviewers: graesslin
Reviewed By: graesslin
Subscribers: plasma-devel, #frameworks
Tags: #plasma_on_wayland, #frameworks
Differential Revision: https://phabricator.kde.org/D8858
Summary:
This allows a server to filter which globals are visible and bindable by
clients.
Design rationale:
Could be it's own class with Display as an arg, but we need the lifespan
to exactly match Display, and the cardinality to match Display and it
needs to be set after we're started but before clients connect.
Better to enfore rules with code than with documentation.
I'm filtering by interface name as there isn't any other good
identifier of what a wl_global refers to, even if you could assume
you can cast the userdata to a Server::Global.
Test Plan: Attached unit test
Reviewers: #plasma, graesslin, bcooksley
Reviewed By: #plasma, graesslin
Subscribers: bcooksley, graesslin, plasma-devel, #frameworks
Tags: #frameworks, #plasma
Differential Revision: https://phabricator.kde.org/D8050
Summary:
This protocol allows to indicate that a wl_surface should inhibit idle
actions such as DPMS, screen locking if the surface is visible.
The protocol is quite simple: it just creates an IdleInhibitor for a
Surface. If such an IdleInhibitor exists the Surface is considered to
inhibit idle.
On the server side it is also exposed like that through the API. The
IdleInhibitorInterface is private to the library and only
SurfaceInterface is extended to expose whether it currently inhibits
idle.
CCBUG: 385956
Test Plan: New test case added
Reviewers: #frameworks, #kwin, #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland, #frameworks
Differential Revision: https://phabricator.kde.org/D8396
Summary:
This is a preparation step to support idle_inhibit_unstable_v1 protocol.
As in Plasma powermanagement, screen locking, dpms, etc. is not
controlled by the wayland compositor but by external components through
the IdleTimeout interface the compositor needs a way to inhibit the idle
timeouts. So once idle_inhibit_unstable_v1 is implemented the compositor
can hook this up to the inhibit API in IdleInterface and thus inhibit
powermanagement, etc. as requested by the idle_inhibit_unstable_v1
protocol.
The added API is straight forward:
* inhibit: inhibits idle timeouts
* uninhibit: uninhibits again
* inhibit and uninhibit must be called in pairs, so twice inhibit,
means uninhibit must be called twice
* isInhibited: whether it's inhibited
* and a signal that it changed
The signal is mostly used internally to stop the timers.
Test Plan: Test case extended
Reviewers: #frameworks, #kwin, #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland, #frameworks
Differential Revision: https://phabricator.kde.org/D8383
Summary:
Implement the "foreign" wayland protocol.
A client can export a surface with an unique string as handle,
then another client can refer to that surface and set an own surface as
child of that surface.
Potential use cases are out-of-process dialogs, such as file dialogs,
meant to be used by sandboxed processes that may not have the access
it needs to implement such dialogs.
The handle needs to be shared between the processes with other means,
such as dbus or command line paramenters.
The public api of the server side only tracks parent/child relationships as this is the only data kwin would need it for, the rest of the api is not exported so should be safer from eventual protocol changes
Test Plan:
the autotest works, but has a lot of random crashes when deleting surfaces,
unfortunately backtraces don't tell much and the crashes never occur when running into valgrind
behavior may still be wrong, depending on how the protocol is supposed
to work if more clients try to set the same exported surface as parent
Reviewers: #plasma, #kwin, davidedmundson, graesslin
Reviewed By: #plasma, #kwin, graesslin
Subscribers: davidedmundson, graesslin, plasma-devel, #frameworks
Tags: #frameworks, #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D7369
Summary:
This allows a server to filter which globals are visible and bindable by
clients.
Design rationale:
Could be it's own class with Display as an arg, but we need the lifespan
to exactly match Display, and the cardinality to match Display and it
needs to be set after we're started but before clients connect.
Better to enfore rules with code than with documentation.
I'm filtering by interface name as there isn't any other good
identifier of what a wl_global refers to, even if you could assume
you can cast the userdata to a Server::Global.
Test Plan: Attached unit test
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: graesslin, plasma-devel, #frameworks
Tags: #frameworks, #plasma
Differential Revision: https://phabricator.kde.org/D8050
Summary:
I don't understand the original logic.
s_allResources contains /every/ resource, not just outputconfigurations.
Sending org_kde_kwin_outputconfiguration_send_applied to a wl_surface (for example),
results in an error.
The reason kwin doesn't currently crash is because we don't actually send
applied/failed after setting outputs. (which is another bug)
Test Plan: The existing unit test still passes.
Reviewers: #plasma, sebas
Reviewed By: #plasma, sebas
Subscribers: sebas, plasma-devel, #frameworks
Tags: #plasma_on_wayland, #frameworks
Differential Revision: https://phabricator.kde.org/D7898
Summary:
There is a race condition in the following situation:
- Server creates a global
- Client binds to that global (making a new resource for that
global)
Simultaneously:
- The client uses this resource
- The server deletes the global
This was fixed for Blur, but as mention in that commit can also happen here.
Code is effectively a copy and paste from e8850b014c
Test Plan: Unit test. Booted normal session
Reviewers: #plasma
Subscribers: plasma-devel, #frameworks
Tags: #plasma_on_wayland, #frameworks
Differential Revision: https://phabricator.kde.org/D7885
Summary:
There is a race condition in the following situation:
- Server creates a global
- Client binds to that global (making a new resource for that global)
Simultaneously:
- The client uses this resource
- The server deletes the global
We then process an event for a resource linked to a deleted global.
This is noted in the specification, the client documentation says:
"The object remains valid and requests to the object will be
ignored until the client destroys it, to avoid races between the global
going away and a client sending a request to it. "
KWayland does not handle this at all.
The global's user data refer to our C++ wrapper
The resource's user data refer to *the same* C++ wrapper
When the global is deleted the resource user data now refers to garbage.
To fix the issue, instead of setting the resource userdata to the
global, we set it to a smartpointer to the global stored on the heap.
We can then validate if our global is still valid.
Theoretically this applies to every global
Practically there are only 3 globals that don't have the lifespan of the
server. Output (which is read only and doesn't matter), Blur and
BackgroundContrast.
Blur resets it's global when a screen geometry changes.
Unfotunately this exactly at the same time that Plasmashell is
doing a lot of processing and creating some blurs.
Test Plan: See unit test
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: graesslin, anthonyfieroni, plasma-devel, #frameworks
Tags: #frameworks, #plasma
Differential Revision: https://phabricator.kde.org/D7870
Summary:
The main clever part that's not just boring boiler plate is how we
handle the structure change
A surface now has an XDGSurface which then has a an Xdg TopLevel or a
Xdg Popup
We need to fit this into the public API which assumes a surface has a
Surface or a Popup.
The old Surface is similar to the new TopLevel.
The shoehorning works by relying on the fact that a surface without a
role is pretty useless.
Clients create the surface implicitly with the toplevel or implicitly
with the popup.
The server only announced it has a new "XdgSurface" when it gets a new
zxdg_surface_get_toplevel.
----
Popup decisions:
- On popup creation the server should copy the current info from the
positioner and then it gets deleted. Given kwaylands job is to keep
state, we expose all these parameter via popup.
- Due to this positioner is not exposed as a resource anywhere.
- Server API is 100% backwards compatiable.
i.e new code will work identically with v5 clients.
- Client API is not. Grabs are called separately from the constructor,
and the parent surface changed to an xdgsurface, not a raw surface.
V5 code still works as-is, just not with the new constructors.
It seemed better to match the v6 (and what will be the stable v7) than
to try and do hacks and lose functionality.
Given the client needs to change the code to opt into V6 anyway. I don't
think this is a huge problem.
Test Plan: Current test still passes.
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: graesslin, mart, plasma-devel, #frameworks
Tags: #frameworks, #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D6047
Summary:
Currently the server treats incoming buffers as not premultiplied.
KWayland::Client sends data that is ARGB32 and ARGB32_Premultiplied as
the same
WL_SHM_FORMAT_ARGB8888.
According to a post on wayland-devel by Fredrik Höglund, all RGB data
should be treated as premultiplied, which matches what Qt is doing.
Client now performs a conversion rather than sending
mismatched data,
Note: This commit will still breaks a bunch of tests in
kwin as it compares the server output to a fixed
QImage with a format.
Test Plan:
Existing tests pass
Modified surface test to check the pixel data relative to the output
QImage format
not the input format (i.e both input from ARGB32 and
ARGB32_Premultiplied) should
both end up in a QImage with format Premultiplied with premultiplied
values.
The existing test was confirming that data was corrupted, checking that
even though
the output format was not pre-multiplied, the data was.
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: plasma-devel, #frameworks
Tags: #plasma_on_wayland, #frameworks
Differential Revision: https://phabricator.kde.org/D7460
Summary:
As per existing TODO.
A new signal is added on Global to emit so we can process the result
whist we still have a valid object. The name is overly explicit to try
and logically separate it from QObject::destroyed().
Test Plan: Updated existing unit test.
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: graesslin, anthonyfieroni, plasma-devel, #frameworks
Tags: #frameworks, #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D7531
Summary:
A compositor should send left events before deleting an output; however
if it doesn't, we don't want dangly pointers in our list of outputs on
the client surface.
Test Plan: Unit test
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: plasma-devel, #frameworks
Tags: #plasma_on_wayland, #frameworks
Differential Revision: https://phabricator.kde.org/D7379
Summary:
A DataDevice will have a source when offers are available, but it can
also be legitimately cleared.
When calling DataDeviceInterface::sendSelection(DataDeviceInterface
*other) if the other data device has no source, we should be setting
that we also have no source.
In addition this also guards against Seat tracking a DataDeviceInterface
with no source when trying to sync x clipboards.
BUG: 383054
Reviewers: #plasma
Subscribers: graesslin, plasma-devel, #frameworks
Tags: #plasma_on_wayland, #frameworks
Differential Revision: https://phabricator.kde.org/D7316
Summary:
This fixes the check in the unittest when doing
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
which I intend to do globally at some point.
Turns out it's comparing with its own executable location, so we
can use QCoreApplication to get it generically.
Test Plan: Verified to work with ctest and with "./testWaylandServerDisplay"
Reviewers: graesslin, mart
Reviewed By: graesslin, mart
Subscribers: plasma-devel, #frameworks
Tags: #plasma_on_wayland, #frameworks
Differential Revision: https://phabricator.kde.org/D6974
Summary:
Currently one has to connect every object manually to connectionDied,
which is something we can do for them.
If the user also has a connection, the second will just no-op.
This fixes objects that linger longer than the QApp.
Reviewers: graesslin
Reviewed By: graesslin
Subscribers: graesslin, plasma-devel, #frameworks
Tags: #plasma_on_wayland, #frameworks
Differential Revision: https://phabricator.kde.org/D6727
Summary:
This is change needed by KWin. KWin has the problem that it destroys its
internal Wayland connection (KWin as client for KWin as server) before
shutting down the application. Other external libraries loaded into KWin
(e.g. breeze window decoration) are unloaded later on, then try to clean
up their Wayland resources and crash KWin due to accessing a no longer
valid Wayland connection.
With the help of this new API KWin can access all connections during
the clean up and destroy them before shutting down the Wayland server and
thus exit cleanly.
Reviewers: #frameworks, #plasma, #kwin
Subscribers: plasma-devel
Tags: #plasma_on_wayland, #frameworks
Differential Revision: https://phabricator.kde.org/D6569
Summary: As 9266a94400 just for text input.
Test Plan: Adjusted test passes, fails without adjustment
Reviewers: #plasma, #frameworks
Subscribers: plasma-devel
Tags: #plasma_on_wayland, #frameworks
Differential Revision: https://phabricator.kde.org/D6786
Summary:
ASAN found a heap-use-after-free when deleting the focused keyboard
surface in the client library. Keyboard did not track the lifetime of
the focused surface and thus one can access already freed memory.
Test Plan: Adjusted auto test to verify the variable gets cleared
Reviewers: #frameworks, #plasma
Subscribers: plasma-devel
Tags: #plasma_on_wayland, #frameworks
Differential Revision: https://phabricator.kde.org/D6741
Summary:
This is a change inspired by https://bugreports.qt.io/browse/QTBUG-61930.
When Qt closes a window due to a key press event it starts to repeat the
event as KWayland does not send a keyboard leave event. Weston on the
other hand does send out the keyboard leave. In my opinion it doesn't
make much sense to send out the keyboard leave in this situation and in
my opinion that is a client bug, but if it makes clients happy we can
send them the keyboard leave. Similar this should be done for pointer,
touch, etc.
BUG: 382280
Test Plan: Run the example added to the Qt bug and it worked fine
Reviewers: #frameworks, #plasma
Subscribers: plasma-devel
Tags: #plasma_on_wayland, #frameworks
Differential Revision: https://phabricator.kde.org/D6683
Using the new extra-cmake-modules module ECMAddQch (since 5.36.0)
this adds the option to automatically build and install a file
in QCH format with the docs about the public API, which then can be
used e.g. in Qt Assistant, Qt Creator or KDevelop.
Additionally the installed cmake config files will be extended
with a target KF5Wayland_QCH containing information about how to "link"
into the generated QCH file, which then can be used in the cmake build
system of other libraries building on this library, by
simply listing this target in "LINK_QCHS" of their ecm_add_qch() usage.
And a respective doxygen tag file with all the metadata about the
generated QCH file and used for the "linking" will be created and
installed.
Pass -DBUILD_QCH=ON to cmake to enable this.
Use the QProcess::start() variant with explicit (empty, in these cases)
arguments, so the program strings are not parsed as shell commands,
thus preserving paths with spaces as such.
Summary: client requests to toggle those states, to be used by libtaskmanager
Test Plan: setting keep above from the taskbar works
Reviewers: #plasma, hein, graesslin, #plasma_on_wayland
Reviewed By: #plasma, hein
Subscribers: graesslin, hein, plasma-devel, #frameworks
Tags: #frameworks, #plasma
Differential Revision: https://phabricator.kde.org/D5757
Summary: Verified it it send before the initial_state and adjust tests and docs accordingly
Test Plan: All unit tests pass
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: graesslin, plasma-devel, #frameworks
Tags: #plasma_on_wayland, #frameworks
Differential Revision: https://phabricator.kde.org/D5887
Summary:
This patch adds a pid event to the plasma window management protocol. It
allows the compositor to tell allow a mapping between windows and processes.
Bumps the version number of the interface to 8 to indicate this.
Test Plan: autotest added, passed
Reviewers: #plasma, hein, graesslin
Reviewed By: #plasma, hein, graesslin
Subscribers: apol, davidedmundson, plasma-devel, #frameworks
Tags: #frameworks, #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D5747
Summary:
It's possible for the surface to be unbound when we send the leave
event; we've called Resource::unbind() of Surface, so the Surface has,
deleteLater called, but it's still a valid object, and the first check
passes.
We get in this situation because when a surface is destroyed, we're
handling text input from the same source event.
Sending a nullpointer is a protocol error, and wayland kindly closes the
connection.
This fixes my constant:
"Did the Wayland server die" error messages when running clients.
Test Plan:
Got errors after setting up qt virtual keyboard.
Had reproducible case.
Restarted kwin after this patch, now doesn't crash.
Reviewers: #plasma, graesslin
Subscribers: apol, graesslin, plasma-devel, #frameworks
Tags: #plasma_on_wayland, #frameworks
Differential Revision: https://phabricator.kde.org/D5712
Summary:
This extends the client side API to support creating popup ShellSurface
windows and the server side API to send out the popup_done request.
This is needed to properly support popup windows (e.g. context menus)
in KWin.
Reviewers: #plasma_on_wayland, #frameworks, #kwin
Subscribers: plasma-devel
Tags: #plasma_on_wayland, #frameworks
Differential Revision: https://phabricator.kde.org/D5174
The setRegion call allows a null region. This means nullptr is an
allowed value which can be passed to ConfinedPointer::setRegion and
LockedPointer::setRegion.
In that case we crash if we try to convert the Region into a wl_region.
Thus add proper nullptr check, just like in
PointerConstraints::lockPointer and ::confinePointer.
Auto test adjusted to cover the condition.
Summary:
The pointer constraints protocol is an unstable protocol and thus
the implementation follows the semantics of unstable protocols.
The protocol allows to create a constraint on the pointer - either a
lock or a confinement on a surface. Those are not activated at once, but
when the compositor actively grants it.
During lock no further pointer motion is emitted, during confinement the
pointer is kept in a certain area.
This implements T4451.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D3466
Summary:
In SeatInterface we need to get all PointerInterfaces related to a given
Surface (Client) and call a method on it. The implementation we had so
far went through all Pointers and put all PointerInterfaces into a new
temporary QVector. In most cases all we did then was iterating over the
returned vector.
Which means we created a temporary vector for nothing.
This change implements a kind of std::for_each with the constraints of
the previously used pointersForSurface which does the check that Surface
is not null and that the client matches. If a PointerInterface is found
for that, the passed in method is invoked on it.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D3295
With this change the generator is able to detect whether an interface
follows the unstable semantics. In that case the header file on server
side looks different. An enum needs to be generated containing the
interface version. Each of the generated classes has a new method
interfaceVersion returning that enum. The ctor of the class is protected
instead of private.
So far only the header side is adjusted. The implementation currently
generates not matching code.
* static void fooCallback definitions added to Private class
* static const foo_listener s_lister added to Private class
* Private::setup generates the foo_add_listner call
* implementation of s_listener added
* base implementation with a TODO marker added for the callbacks
Summary:
Pointer gestures are created for a pointer and there are two types of
gestures: swipe and pinch.
At a given time there can only be one active gesture. The implementation
in SeatInterface ensures that there can only be one active gesture.
Each gesture consists of a start event, 0 to multiple update events and
an end event. The end can also be a cancel. To better support this the
implementation doesn't follow the protocol and splits end and cancel
into dedicated methods in the server side and into dedicated signals in
the client side.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D3169
This is ancient code that is outright wrong most of the time and at best
just incredibly unnecessary.
It is also not present in the great majority of frameworks due to this.
Its wrongness comes from the fact that it hardcodes the installation path,
which breaks relocatability of the KF5 tree as it will always attempt to
find the include dir $PREFIX/KF5 (e.g. /usr/include/KF5), which may or may
not exist given that the tree was relocated.
Worse yet, in a cross-building scenario we maybe for example
build on ARM and install to /usr but for cross building take the entire ARM
tree and shift it into /arm/usr/. If we then crossbuild on that tree the
bogus include list in this framework will make sure that we always search
in /usr/include/KF5 and thus potentially load a !ARM header simply because
the relevant ARM header was not installed etc.. Similarly of course a
build in $HOME can pick up /usr/include/KF5 headers because the home ones
are missing, causing unexpected results.
This happens whenever the KDE_INSTALL_INCLUDEDIR_KF5 var is absolute, which
it usually is.
On top of all that the premise of the code in question is flawed. It seeks
to add $PREFIX/$KF5INCLUDES to the search paths (e.g. /usr/include/KF5).
This is unnecessary because the target itself is properly installed via
cmake's install(TARGETS ... EXPORT ...) function [1]. This function has
smart functionality built in which will add the passed INCLUDES destination
to the INTERFACE_INCLUDE_DIRECTORIES property of the targets (i.e. what
the useless code wants to do) [2].
So what happens is that we install the target to the
KF5 locations, which has "include/KF5" as INCLUDES location,
thus causing the correct path to be added to the includes list of the
Targets.cmake file.
In particular thanks to more internal magic in cmake it will do so with
automatically resolved root paths such that the installed tree is
relocatable and able to relatively find the other KF5/* headers. So it
does what the code in question wants to do, just correctly.
Since cmake automatically takes care of injecting $prefix/include/KF5 we
can simply get rid of the wrong custom inejection code. This makes the
generated cmake file find the correct include/KF5/ directory and stops it
from always expecting a /usr/include/KF5/ directory to be present.
[1] https://cmake.org/cmake/help/v3.0/command/install.html
[2] https://cmake.org/cmake/help/v3.0/command/install.html
> The INCLUDES DESTINATION specifies a list of directories which will be
> added to the INTERFACE_INCLUDE_DIRECTORIES target property of the
> <targets> when exported by the install(EXPORT) command.
REVIEW: 129273
CHANGELOG: Improved relocatability of CMake export
The test destroyed the connection prior to destroying registry and event
queue. Thus causing problems. Hopefully this change fixes the segfault
on build.kde.org.
The test has KWayland::Client objects like Registry as member variables
of the test object. This causes the objects to be destroyed with the
dtor after cleanupTestCase is run which destroys the connection and
Wayland server. At least on the CI system this seems to cause problem.
In general our tests do not keep any state around, especially not
KWayland::Client objects. The normal way is to have a new dedicated
client connection for every test method. This test doesn't follow this
approach at all.
In case that this change does not fix the test and still crashes on
build.kde.org the only option is to drop the test and replace it by a
new variant which follows the approach of other tests.
Reorder the cleanup code. It doesn't make sense to delete the client
side objects after deleting the server side objects. This might be a
reason for the failing tests on build.kde.org.
Summary:
In case the current selection does not have a DataSourceInterface
updating the focused keyboard surface resulted in a crash. The current
selection is sent to the DataDeviceInterface of the newly focused
client and thus a DataOfferInterface would be created for a null
DataSourceInterface.
This is a similar fix as D3148 and D3149.
Test Plan: Test case added which used to crash before
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D3150
Summary:
This is a similar condition as D3148. If a DataDeviceInterface is
created for the currently focused keyboard Surface the current selection
is sent to the new DataDeviceInterface. If the current selection does
not have a DataSourceInterface a DataOfferInterface for a null
DataSourceInterface would be created and result in a crash.
This change verifies that there is a DataSourcInterface on the current
selection prior to sending out the selection.
Test Plan:
A test case is added which simulates the condition by
using two clients.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D3149
Summary:
SeatInterface provides a way to set the current selection. This method
did not verify whether the new DataDeviceInterface actually has a
DataSourceInterface. If there is no DataSourceInterface on that
DataDeviceInterface the selection should not be sent to the current
selection owner. This results in a crash as DataOfferInterface
(correctly) doesn't expect the passed in DataSourceInterface to be null.
To ensure we don't hit this again the DataOfferInterface ctor gained an
Q_ASSERT to validate the DataSourceInterface.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D3148
The generator misdetected the destructor Requests by looking at the
arguments instead of the type of the request.
In addition the destructor handling changed in KWayland::Server since
the generator got created. There is now a shared implementation for the
Resource destruction. The generator is adjusted to generate the code for
that and implements the destruction for the Global resource destruction.
Summary:
By default a panel does not take focus. But there are panels which
should get keyboard focus. Examples in a Plasma session are the widget
explorer.
This change adds a new request to PlasmaShell interface to specify
whether a panel should get focus. The compositor can use this request to
decide whether to pass focus to a panel.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D3035
Summary:
This change adds support for auto-hiding panels. A PlasmaShellSurface
with Role Panel and PanelBehavior AutoHide can request to get
auto-hidden at a screen edge. The compositor will then not show the
surface although it is still mapped and will show it again once the
screen edge gets triggered.
The interface is extended by one new request to allow the client to
request the hiding of the surface. In addition two events are added to
inform the client when the surface got hidden and when it got shown
again.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D3007
Summary:
Especially for Xwayland windows the compositor might not have a themed
icon name. Resulting in a task manager not having dedicated icons for
Xwayland windows.
This change deprecates the way how a compositor is supposed to set the
window icon. Instead of passing the themed icon name, it is now supposed to
pass the QIcon. In case it's a themed icon the existing way to pass to
the client is used.
Otherwise a new event is used to inform the client that there is an icon
- no data is transmitted at this point. The client can then create a
file descriptor and pass it to the compositor. The compositor serializes
the icon into the file descriptor and the client can read from it. This
all happens transparently on client side there is no api change at all.
The writing and reading of the icon is done in a thread. Due to that
Qt5::Concurrent is now a required dependency instead of an optional
dependency.
Reviewers: #plasma_on_wayland, hein
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D3049
Summary:
Qt supports setting generic data on a QWindow. This change implements
the callback properly and forwards the property to the surface extension
instance. This allows the compositor to e.g. listen to
DynamicPropertyChangeEvents and get access to all additional set
properties.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D3045
Summary:
This is similar to what already exists for Surface. With this methods
it's possible to get a ShellSurface from an existing QWindow and to
perform low level native calls directly for the ShellSurface.
Similar calls will also be needed for XdgShellSurface, though the
xdg_shell_surface is not yet available through the native interface.
Test Plan: Used in breeze to trigger window moving
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D3018
Summary:
This is what Weston does. With this change clients can create
multiple wl_pointer instances and thus get events reported to all of them.
This will be needed to e.g. support drag on empty area in Breeze on Wayland.
A similar change was done for wl_keyboard already in 25dbc84d.
Test Plan: Seat auto test still passes
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D3016
Summary:
In the situation that a wl_client gets destroyed while still
wl_resources are around it can happen that one of them calls into the
ClientConnection during the cleanup handling which gets triggered at the
same time. This can then trigger a crash.
This change uses deleteLater for the ClientConnection and sets the hold
wl_client pointer to null instead of deleting directly. So the
ClientConnection is still around while the Resources gets cleaned up.
This is similar to the cleanup of Resource where on unbind the
wl_resource pointer is set to null and the Resource gets delete later.
BUG: 370232
FIXED-IN: 5.28
Reviewers: #plasma, bshah
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D3004
Summary:
This change implements the zwp_relative_pointer_v1 protocol which allows
to send relative motion events.
The (unstable) protocol consists of a RelativePointerManager which
creates RelativePointers for a given Pointer. This interface currently
only has one event to report the relative motion. It carries the delta,
the non-accelerated-delta and a timestamp in microsends granularity.
On the server side the implementation is mostly internal. Once a
RelativePointerManagerInterface is created one can send relative motion
events through the SeatInterface. The SeatInterface takes care of
sending it to the responding RelativePointerInterface. The protocol does
not restrict the sending of "normal" and relative motion events. Thus it
can be combined in any way one wants. This allows to have a rather
simple implementation. A user of the SeatInterface can just start to
feed the relative motion events (if the information is available) to the
SeatInterface together with the pointer events.
On client side a new RelativePointerManager and RelativePointer class
are added. The RelativePointerManager creates the RelativePointer for a
given Pointer. The event sent to RelativePointer is transformed in a
normal signal.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D2978
Summary:
When changing the selection the previous selection needs to be
cancelled. This is already done in the "normal" updating of the
selection. If the previous selection doesn't get cancelled QtWayland is
not able to accept anything new from the clipboard. The setSelection
didn't cancel it yet, due to that copy from Xwayland to QtWayland
windows doesn't work in KWin as KWin uses the setSelection call for the
Xwayland clipboard.
With this change the cancelling of previous selection is moved into a
dedicated method and called from the normal way and the setSelection
way.
Reviewers: #plasma_on_wayland, bshah
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D2997
Summary:
This is what Weston does. With this change clients can create multiple
wl_keyboard instances and thus get events reported to all of them. This
will be needed to e.g. support KModifierKeyInfo on Wayland.
Similar changes are probably also needed for pointer and touch.
Test Plan:
Auto test for seat still passes. A custom change to kscreenlocker
is able to report whether caps lock is on with this change.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D2963
Summary:
This change makes use of the internal key state in better way. If a
key is not considered pressed, no key release is sent. This can happen
for example if the compositor grabs a key press (global shortcut) but not
the release. The Wayland client cannot do anything with the release as it
never got the press. Thus it doesn't make sense to send the release.
Similar if a key is already pressed, it doesn't make sense to send
another press event. This ensures that if the server sends in repeating
key presses they are filtered out. Key repeat is handled on client side.
Also if several physical keys send the same key code, pressing them at
the same time won't send double press/release event.
This change might cause regressions in KWin in case KWin does not handle
the situation correctly. But that would be a bug in KWin which needs to
be fixed there. If it causes regressions the bug might have shown in
other situations as well.
BUG: 366625
FIXED-IN: 5.27
Reviewers: #plasma_on_wayland, #kwin
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D2786
Summary:
According to the Wayland documentation a data source needs to be
cancelled whenever it is no longer valid. A reason for no longer being
valid is that the data source has been replaced by another data source.
So far KWayland did not implement this aspect which resulted in clipboard
breaking in QtWayland applications. As soon as one copied once from an
application it was no longer possible to paste to it from another
application.
With this change the data source gets properly cancelled and also
ensured that the server code doesn't run into a possible crash condition
when trying to cancel an already unbound data source.
BUG: 368391
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D2743
Summary:
This change implements support for the wl_surface events enter and
leave. Those events are emitted whenever a surface becomes visible on
an output by e.g. mapping the surface, moving or resizing it. Similar
the leave is sent whenever the surface is no longer on an output.
The server side is not yet fully complete yet. It also needs to emit
when the client binds the output another time and needs to send a
leave before destroying the output.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D2528
Summary:
This change starts to track all Outputs and introduces a static
method to get an Output* for a wl_output* in case the wl_output* is
known to Output.
This is needed for the enter and leave events on wl_surface.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D2526
The test started to segfault on build.kde.org. It looks like an event
survives the destruction of the server. Thus this change tries to
dispatchEvents once more before destroying everything.
It started to fail on build.kde.org with a segfault. While I cannot
reproduce this locally it looks like client objects survive to the next
test and thus cause issues.
This change attempts to reduce the risk by making sure that everything
is cleaned up correctly. If that fixes the issue we can look into a
proper fix.
Summary:
Instead of hard depending on the include of linux/input.h we check
whether that include file exists and properly ifdef all usages.
Unfortunately there is no replacement for those parts which do mapping
of input event codes.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D2344
On build.kde.org the Surface is often already destroyed when returning
from waiting on client disconnected.
This change tries to handle the situation better: only if the signal
is not yet emitted, try to wait for it.
Newer Weston renamed the interface to the unstable naming scheme. As
KWayland does not support this interface yet, the tests are failing.
This change skips the test if the Weston is too new and doesn't provide
the expected interface any more.
If the client deletes the currently entered Surface the Pointer should
return null in Pointer::enteredSurface and not invalid memory.
At the same time a now incorrect assert is removed. After the client
deletes the Surface it might still get a left event for the Surface.
In that case a comparison between the enteredSurface and the Surface
from the leave event would fail.
Reviewed-By: bshah
Summary:
This allows the compositor to expose the absolute window geometry to
processes which need it.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D2183
Summary:
If we try to send a pointer enter on a null resource of a Surface
(e.g. after unbound) we hit a marshalling error:
error marshalling arguments for enter (signature uoff): null value passed for arg 1
The added test case hits this error without the change and passes
cleanly with the change.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D2159
Summary:
This change introduces support for the unstable xdg-shell interface in
the server. The implementation is based on version 5 of the unstable
interface. This is the version used by toolkits like e.g. GTK.
There is also a version 6 of the protocol under development which is
incompatible. This makes it difficult to implement it in a backward
compatible way.
Because of that the implementation is a little bit different to other
interfaces and inspired by the TextInput interfaces:
On client side an XdgShell class is exposed which does not represent
it directly. Instead it delegates everything to an XdgShellUnstableV5
implementation. For the Surface/Popup the same is done.
In the Registry it's possible to create an XdgShell and it accepts
the XdgShellUnstableV5 and in future will accept XdgUnstableV6, etc.
On server side it also follows the approach from TextInput. That is
there is a version enum which gets passed to the factory method in
Display. It currently supports only V5, but in future can be extended
for V6. As there is lots of similar code between wl_shell, xdg_shell
and in future xdg_shell_unstable_v6 a templated GenericShellInterface
class is added which combines the common parts.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D2102
Summary:
When setting the keyboard focus the server needs also to send the current
selection to the client. So far KWayland only sent the selection if it was
set. That is if the last focused client cleared the selection it was not
updated and the client might have had an outdated selection.
To prevent this situation the server now explicitly sends the clear to the
client on enter if there is no selection. Also if the selection is cleared,
the SeatInterface now unsets it's current selection to make sure that the
next focused keyboard will get the clear selection sent.
Test Plan:
Existing test case adjusted and a new test case added which
simulates the interaction of two clients.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D2091
Summary:
Even if the XDG_RUNTIME_DIR is not set, KWayland should not crash
if methods are invoked which only make sense after the server was
started successfully. This was not yet the case for
Display::dispatchEvents.
Also the wl_display was not destroyed in the situation that creating
the socket failed.
Test Plan:
Test case added which simulates the situation of no
XDG_RUNTIME_DIR being set.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D2077
Summary:
This change adds a parent_window event to Plasma Window. From server
side it's possible to specify that a window is a transient for another
window - that is it has a parent window.
On client side this is exposed respectively with a new change signal.
Reviewers: #plasma_on_wayland, hein
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1779
Summary:
As Wayland doesn't have a proper ToolTip window type yet, we add it
to PlasmaShellSurface, so that we can use it for Plasma's tooltips.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D2030
Summary:
On client side the newer wl_pointer_release is used which is a
destructor call. On server side the shared destroy callback is used
and it's ensured that KWayland doesn't crash if called into the
PointerInterface between unbound and destroyed.
Test Plan:
Test case extended to cover the condition of an unbound
PointerInterface.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D2037
Summary:
On client side the newer wl_keyboard_release is used which is a
destructor call. On server side the shared destroy callback is used
and it's ensured that KWayland doesn't crash if called into the
KeyboardInterface between unbound and destroyed.
Test Plan:
Test case extended to cover the condition of an unbound
KeyboardInterface.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D2036
Summary:
On client side use wl_touch_release to get into the proper destroy
handler on server side. There the shared destroy implementation is
used.
The test case is extended to verify the condition and ensure that
our code doesn't crash in case SeatInterface calls into the already
unbound TouchInterface.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D2035
Summary:
So far SeatInterface handled automatically which DataDeviceInterface
holds the current clipboard selection. While this works fine and is
correct it doesn't support use cases like a clipboard manager where
the clipboard is hold by a different ClientConnection than the one
from the focused keyboard.
This change allows to manually set the selected DataDeviceInterface
to override the automatic selection, though the automatic selection
is still in place. Thus the next update of a selection will override
the manually set selection again.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D1972
Summary:
A Resource might be unbound, but not yet destroyed. In that case this
return a Resource instead of nullptr.
This change adds an explicit nullptr check.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D1938
Summary:
Creates a PlasmaShellSurface and allows to set the different roles
through command line argument.
Needed to verify that KWin properly handles the notification type.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D1932
Summary:
Plasma needs to be able to mark windows as Notifications, so that KWin
can put them into the right layer.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D1928
Summary:
The QtExtendedSurfaceInterface might be unbound and thus the resource
might be null when calling into close. Thus we need to do a nullptr
check.
Hit a crash there.
Test Plan:
Unfortunately no test case as we don't have a client side
implementation for this.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D1961
Summary:
This is a gotcha moment:
1. Create Surface with id 1
2. destroy that Surface
3. Create another Surface
Now if in step 3 the id is by pure chance getting reused and also 1, the
wl_resource pointer of the SurfaceInterface of step 1 and step 3 are
the same. This is rather unexpected and causes problems.
When creating a ShellSurface in step 1 and step 3 it would fail. KWayland
finds a ShellSurface which was already created for the Surface. The same
can happen with QtSurfaceExtensionInterface and PlasmaShellInterface which
also go into error state.
On client side this would trigger a protocol error and terminate the
application. An easy way to reproduce is opening the file open dialog
from within Kate multiple times.
This change addresses this problem by setting the surface pointer in
those classes to null when the parent Surface gets destroyed. Thus
creating a new ShellSurface won't find the old referenced Surface any
more.
For ShellSurface and PlasmaShellSurface a test case is added which hit
the condition without this change. For QtSurfaceExtension we don't have
the client side, so we cannot really simulate the condition.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D1937
Summary:
So far for internal cleanup we mostly listen to QObject::destroyed.
When a Resource gets unbind the wl_resource is set to null and the
Resource gets deleteLater. This creates a short time frame when the
Resource is still there, but the wl_resource is null. For most internal
usages the Resource is completely useless at that point and should no
longer be considered. So far it was still considered and could hit
crashers, if a code path did not nullptr check. Unfortunately
libwayland-server is not nullptr safe: if called with a null value it
tends to crash.
So this check introduces a new signal unbound which can be listend to
in addition to the destroyed signal. It's used in SeatInterface for
DataDeviceInterface, where we experienced a crash related to that.
A test case is added which exposes the crash, but it already needs
the unbound signal to get into the crashy condition. The actual crash
is fixed twice - with the help of the unbound signal, but also by
introducing the nullptr check where it's needed.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D1868
Summary:
The fact that the buffer is still referenced - that is used - when the
BufferInterface gets destroyed is an error, but it is not fatal.
Unfortunately KWin/Wayland is still hitting this assert from time to
time and the assert is not helping to find the cause as a backtrace
does not show where a reference is still hold.
This change removes the hard assert by a soft warning. The advantage
of the warning is that the compositor is not killed and that we can
observe the reason and find a usage pattern which triggers the condition.
With that we will hopefully be able to find the case where the buffer
is still referenced when being destroyed and fix that.
Reviewers: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D1783
Summary:
This improves the cleanup of a shadow from client side. The server now
notices when the client destroyed the shadow.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Differential Revision: https://phabricator.kde.org/D1789
Sometimes the test is failing due to a wait on the signalspy not
working and then the cleanup triggers a heap-use-after-free.
This change tries to address the problem by using a QTRY_COMPARE
instead of a wait on signalspy.
If a PlasmaShellSurface got already created for a Surface, the
PlasmaShell::createSurface should return that one. This change justs
adds a check to an autotest to verify this condition.
Summary:
The event is sent to the client once all initial state is transmitted.
This means the client is able to see the PlasmaWindow completely created
and not in the intermediate state with further updates being pushed after
being created.
The client side API is adjusted to emit the windowCreated signal after
the initial state event is received. In addition if the window is already
unmapped, the signal will never be emitted which means the not valid
windows are not exposed to the client at all.
The tests are adjusted to reflect the new reality, which in most cases
just means removing the comment that this needs to be improved.
There is one kind of unrelated change included: when an empty icon is
set, the client side now creates a QIcon() instead of going through
QIcon::fromTheme. This wrong behavior was exposed now by the auto tests.
Reviewers: #plasma, hein
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1773
Summary:
If the surface passed in the transient request is to the surface of the
shell surface, KWin aborts. It's an obvious invalid request, so handle
it properly by sending an error.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1755
Summary:
So far ConnectionThread dispatched events without checking for (protocol)
errors. But Wayland errors are considered fatal. We do need to consider
them.
This change introduces a way to detect errors and expose them in
ConnectionThread. Errors are handled gracefully, they are exposed, but
not considered application fatal. E.g. a new ConnectionThread could be
created afterwards.
This allows to add tests to verify error conditions.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1753
Summary:
The idea of shipping a test server is to have something like Xvfb for
Wayland. To be able to run a test application with a fake Wayland server.
To make this super easy the test server binary is installed into libexec
directory and provides a cmake function to run a test application with
the test server.
The test server takes full control over the process. It's a guiless
application and starts the passed test application once it is fully
set up. The environment is setup to have the test application connect
to the fake server (WAYLAND_SOCKET env variable and QT_QPA_PLATFORM).
When the started application finishes the test server goes down and
exits with the exit value of the test application. This allows a good
integration with ctest.
The test server is a virtual server which supports the following
interfaces:
* Shm
* Compositor
* Shell
* Seat
* DataDeviceManager
* Idle
* SubCompositor
* Output (1280x1024 at 60 Hz with 96 dpi)
* FakeInput
This is sufficient to bring up a QtWayland based application and
allows some basic interactions from a test application (e.g. fake
input).
So far the server fakes a repaint every 16 msec, but does not yet
pass events to the test applications.
To integrate this into an application for testing use:
find_package(KF5Wayland CONFIG)
add_executable(myTest myTest.cpp)
target_link_libraries(myTest Qt5::Gui Qt5::Test)
kwaylandtest(myTest)
When now running ctest in the build directory the test server gets
started and will start the myTest binary and report the passed/failed
in the expected and normal way.
This way a test case can easily be run against both X11 and Wayland.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1726
Changelog: Virtual framebuffer server for auto tests
Summary:
So far we directly destroyed the resource on the server side. But this
causes a wayland error when the client tries to cleanup. This results in
the client being destroyed. A problem which brings down plasmashell
regularly when short living windows are shown. This happens e.g. in
Dolphin with the adress auto complete.
This change addresses the problem by creating a temporary
PlasmaWindowInterface for the already unmapped window. It doesn't get
added to the list of known windows and it's only purpose is to properly
handle the unmap and the destroy of the just created resource.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1734
Summary:
Destroying the SlideInterface on the server side before the client has a
chance to cleanup results in a protocol error:
wl_display@1: error 0: invalid object 7
Which would terminate the client. If we would not destroy the resource,
but only delete the SlideInterface it could result in heap-use-after-free.
So just don't do anything, the client needs to cleanup which will result
in the SlideInterface being deleted.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1714
Summary:
The destructor was not properly implement. Let's use the generic one
from Resource.
Test case is adjusted to verify that the SlideInterface gets cleaned up.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1713
Summary:
Unlike the other cases this one is not as dangerous as the shadow
protocol doesn't have a destructor request (yet).
Once that is added the problem would be the same: destroying the
ShadowInterface when the parent SurfaceInterface gets destroyed would
result in a protocol error on client side.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1711
Summary:
Destroying the ServerSideDecorationInterface on the server side before
the client has a chance to cleanup results in a protocol error:
wl_display@1: error 0: invalid object 7
Which would terminate the client. If we would not destroy the resource,
but only delete the ServerSideDecorationInterface it could result in
heap-use-after-free.
So just don't do anything, the client needs to cleanup which will result
in the ServerSideDecorationInterface being deleted.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1710
Summary:
Destroying the ContrastInterface on the server side before the client has
a chance to cleanup results in a protocol error:
wl_display@1: error 0: invalid object 7
Which would terminate the client. If we would not destroy the resource,
but only delete the ContrastInterface it could result in
heap-use-after-free.
So just don't do anything, the client needs to cleanup which will result
in the ContrastInterface being deleted.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1709
Summary:
Destroying the BlurInterface on the server side before the client has a
chance to cleanup results in a protocol error:
wl_display@1: error 0: invalid object 7
Which would terminate the client. If we would not destroy the resource,
but only delete the BlurInterface it could result in heap-use-after-free.
So just don't do anything, the client needs to cleanup which will result
in the BlurInterface being deleted.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1708
We saw it fail on build.kde.org a few times and it looks like a
entered spy gets triggered timing dependent (no surprise it's on
client side). So better check whether the entered spy got delivered
already and if not wait for the event.
Summary:
This change standardizes the behavior regarding the destructor request.
The destructor should destroy the resource and nothing else. The
Wayland library invokes the static unbind method once the resource is
destroyed. The implementation provided by Resource::Private::unbind
triggers a delete later on the Resource. So there is no need to trigger
a deleteLater from the destructor request callback.
This change adds a generic implementation to Resource::Private which is
now used by all inheriting classes replacing the custom implementations.
Test Plan:
For a few Resources the test is extended to ensure that the Resource
gets deleted on server side.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1679
Summary:
Not needed as the dtor of the Resource ensures that the wl_resource
gets destroyed.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1680
The text input change creates an additional serial, so the check
for last generated serial on the Display fails. The test is now
adjusted to the new semantics. A more reliable way would be to
verify the serial on the SeatInterface, though.
Summary:
This change introduces support for text input. Text input allows to
compose text on the server (e.g. through a virtual keyboard) and sent
the composed text to the client.
There are multiple interfaces for text input. QtWayland 5.6 uses
wl_text_input, QtWayland 5.7 uses zwp_text_input_v2.
wl_text_input is from pre Wayland-Protocols times and considered as
UnstableV0 in this implementation. The other interface is UnstableV2.
Unfortunately the V2 variant is not yet part of Wayland-Protocols, but
used in Qt.
The implementation hides the different interfaces as good as possible.
The general idea is the same, the differences are rather minor.
This means changes to how interfaces are wrapped normally. On client
side in the Registry a manager is factored which represent either of
the two interfaces. Similar on the server side Display's factory method
takes an argument to decide which interface should be factored. This
way a user of the library can expose both interfaces and thus be
compatible with Qt 5.6 and Qt 5.7 onwards.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1631
Summary:
When destroying a SurfaceInterface all callbacks are getting destroyed.
This used to iterate over the callbacks and performing
wl_resource_destroy on them. This triggered the destroy handler which
removes the resource from the callback list. Which means removing from
the list we are iterating on. This could result in a double delete or
accessing invalid memory.
This change copies all callbacks to a temporary list and clears the
normal lists. So the destroy handler does no longer modify the lists
currently being iterated on.
Test Plan: Added a test case which crashed with previous code
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1677
The ShellSurface might have the resource destroyed, before being deleted,
so there is a short time frame where resource might be null.
Crash was caught by KWin.
Reviewed-By: sebas and notmart
A downstream KWin test shows a possible heap-use-after-free if we
access the wl_client pointer. Basically we get the client disconnected
just before the focused surface gets unbind. Thus for a short moment
the ClientConnection pointer is gone. This needs to be extended with
a test case, but for the moment it should be good enough to get KWin
green again.
Summary:
So far the server component performed manual cleanup in some cases
when a client disconnects. But this is not needed: the Wayland library
calls the static unbind methods which do cleanup. If we cleanup ourselves
this can result in double deletes in the worst case, so let's only use
the Wayland functionality.
Adjusted:
* RegionInterface
* SurfaceInterface
* ShellSurfaceInterface (doesn't take a parent anymore)
* DpmsInterface
* QtSurfaceExtensionInterface
* KeyboardInterface
* PointerInterface
* TouchInterface
* DataOfferInterface
* PlasmaShellSurfaceInterface
For each adjusted case a test case is added to verify that the cleanup
works. Exceptions are DpmsInterface as the actual Resource is not exposed
at all in the Server component and DataOfferInterface as that is server
side created.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1640
From time to time the test is failing on build.kde.org with an ASAN
heap-use-after-free error. From my investigation this seems to be caused
by the OutputDevice being constructed on the stack and being destroyed
while handling Wayland events, but before all are handled.
The test mostly operates on the changed signal. There is also a done
signal emitted later on. Wayland sends the done after a set of changes
is transmitted. Thus the test is adjusted to wait for done instead of
changed. So we can ensure that all events are handled before the object
gets destroyed.
I have never been able to reproduce the problem locally, so I cannot
guarantee that the issue is solved for good. If it still happens more
investigation will be needed.
Summary:
When the model gets destroyed the lambda connections were still invoked
and could cause crashers.
Test Plan: Test case added and each one verified that it crashed
Reviewers: #plasma, hein
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1624
Summary:
There is a possibility that a PlasmaWindow is unmapped when the
PlasmaWindowModel gets created. In this situation the unmapped
PlasmaWindow will be deleted in the next event cycle. So far
PlasmaWindowModel didn't handle this situation and the model might
hold deleted objects due to this.
This change addresses this potential problem and ensures the model
gets updated when a PlasmaWindow is deleted.
Test Plan: Test case which exposes the problem is added
Reviewers: #plasma, hein
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1622
Summary:
So far when the active PlasmaWindow got unmapped or destroyed, the
PlasmaWindowManagement didn't update the activeWindow. This means it
could expose a deleted object through it's API which could result in
a crash.
This change addresses the problem by updating the active window when
a window gets unmapped or destroyed.
Test Plan: Tests added which exposed the problem
Reviewers: #plasma, hein
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1621
Summary:
The protocol is extended by a dedicated destructor request. When a
PlasmaWindow is umapped we no longer destroy the resource directly,
but only send the unmap. The client is then supposed to clean up
(which it already did in that case) and will invoke the destructor.
The PlasmaWindowInterface object will be automatically deleted after
the unmap once all resources bound for it are destroyed.
The tests are extended by two new test cases which triggered protocol
errors on the client side prior to this change.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1594
Summary: To use pid_t one should include sys/types.h -- else the build fails on FreeBSD.
Reviewers: graesslin
Reviewed By: graesslin
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1579
Coverity complains (in CID 1335150) about `Generator::parseInterface()`
since the default copy-ctor for `Interface` will end up copying
uninitialized memory (the unset `m_factory` member). Fixed by
initializing the m_factory.
REVIEW:127836
Summary:
Exposes closable state in the window model and adds tests. This was
included in the protocol and interface, but missing from the model.
Test Plan: Autotest extended.
Reviewers: graesslin
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1435
Summary:
Analogous to NET::ActionChangeDesktop.
KWindowInfo::actionSupported(NET::ActionChangeDesktop) is hardcoded
to return true in kwin, but that's not how it should be; as this will
be fixed later the Wayland protocol needs this state bit as well for
parity.
Test Plan: PlasmaWindowModel test is extended.
Reviewers: graesslin
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1448
Summary:
Adds states and request methods to determine whether a window can be put into
move or resize modes, and request move and resize modes, respectively.
request* naming pre-discussed with Martin. I chose to add *Mode to be more
explicit as well as avoid namespace conflicts with possible other Move/Resize
methods in the future.
Since these are not toggleable states, there is no requestToggle* methods.
Protocol version is not bumped (also pre-discussed with Martin) since we have
pending changes already bumping to 3.
Depends on D1417.
Test Plan: PlasmaWindowModel test extended.
Reviewers: graesslin
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1432
Summary:
This adds support for 'shadable' and 'shaded' states to the protocol and
to the client and server classes, as well as the window model.
Test Plan: The PlasmaWindowModel test has been extended to test the new states.
Reviewers: graesslin
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1417
Summary:
Surface/SubSurface and Shadow handle the case that an attached buffer
gets destroyed by the client. So far we didn't have this code covered,
but it's rather important as incorrect reference counting can hit
asserts.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1403
Summary:
KWayland does not have a client implementation of the QtSurfaceExtension
protocol. Thus the test is different: it starts a helper binary which
creates a QWindow. The test closes that one which should terminate the
started applications.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1388
Summary:
Basic functionality is covered. Changing of shadow elements not covered,
there seems to be lacking server API for that - no change signal.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1398
Summary:
Now also tests:
* requesting mode from client side
* update supported change on server side
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1357
If the focused pointer and keyboard surface is the same we use pointer
clicks as a hint to which child surface should have keyboard focus.
Keyboard focus handling for sub surfaces is rather limited overall.
We just don't have a good model on how to determine which child surface
should get the keyboard focus. When passing focus to a surface there
is no way to know which of the sub-surfaces should get the focus.
Ideally the client should handle this, but that's just not the case.
The best we have is a reference through the pointer. But that's of
course also limited. Keyboard focus passed to the surface for another
reason (Alt+Tab) cannot select the proper sub-surface without interaction
from another input device.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1330
Summary:
The idea behind this change is to make the existance of sub-surfaces
an implementation detail for pointer events. The user of the library
does not need to care about on which sub-surface the pointer is on.
It only needs to care about the main surface and passes the focus to
the main surface.
Internally the PointerInterface takes care of sending the enter to
the sub-surface at the current pointer position. Also whenever the
pointer position changes, the PointerInterface evaluates whether it
triggered a change for the focused sub-surface and sends enter/leave
events accordingly. If the focused sub-surface does not change, it
sends motion events as normally, but of course under consideration
of the sub-surface position.
Overall this means that from pointer usage perspective a user of the
library doesn't need to care about the fact that there are sub-surfaces
at all. The library does the correct thing for it.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1329
Summary:
The new method returns the (child) surface at a given surface position
taking care of stacking order, whether surfaces are mapped, etc.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1319
Summary:
This change introduces a damage tracking feature in SurfaceInterface.
So far the SurfaceInterface only exposes the damage compared to the
last attached buffer. But this is not always usefull for the user of
the library. E.g. if:
* server renders
* client damages buffer and commits
* client damages buffer and commits
* server wants render
In this situation the last damage information is not helpful to the
user of the library. It would need the combined damage information over
all attached buffers.
The new API combines the damage of the two commits in the example above.
The user of the library can then call resetTrackedDamage once it
processed the current damage (e.g. by updating the OpenGL texture).
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1281
Summary:
QtWayland doesn't map the parent sub-surfaces in a sub-surface tree.
According to the spec this would mean also the child sub-surface is not
mapped. But being strict according to the spec will make applications
like SystemSettings fail badly. Embedded child windows will not be
rendered and QtWayland is going to hard freeze. This is not acceptable,
thus we need to workaround this QtWayland bug till it's fixed.
It's worth mentioning that Weston as the reference compositor also
doesn't handle this situation according to spec and renders the
sub-surface. See https://bugs.freedesktop.org/show_bug.cgi?id=94735
The difficult part for the workaround is to determine whether a surface
should be considered unmapped. E.g. when the parent gets unmapped we need
to really unmap it. But what's the difference between an unmapped parent
surface which should be considered mapped and an unmapped parent surface
which should be considered unmapped?
The implementation goes with considering a new sub-surface always as
mapped - independently of whether it ever got a buffer attached. As soon
as it had a buffer attached and it gets unmapped again, it will go back
to a standard conform way.
The behavior now is not standard conform, thus the autotest is adjusted
to have QEXPECT_FAIL for the now no longer standard conform areas.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1250
Summary:
If a Surface doesn't have a buffer attached and a null buffer gets
attached the buffer state doesn't really change. Thus neither the
unmapped signal nor the damaged signal should not be emitted.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1261
Summary:
New test case which verifies the behavior when a surface is considered
mapped or unmapped in a sub-surface tree.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1248
Summary:
In a SubSurface tree a Surface is only considered mapped if the Surface
has a buffer applied and the parent Surface is mapped.
The added method implements this check. It's useful for the compositor
to easily check this condition as it allows to easily figure out whether
a SubSurface needs to be rendered and it's also useful for implementing
the input handling as a not mapped sub-surface should not get any input
events.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1247
Summary:
This is a workaround for https://bugreports.qt.io/browse/QTBUG-52118
It should take effect whenever the parent surface's state is applied,
but QtWayland never commits the parent surface. Thus the position is
always wrong.
Having a workaround for that in our server code is not good, but better
than completely broken applications such as Systemsettings.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1212
Summary:
From spec:
If the wl_surface associated with the wl_subsurface is destroyed,
the wl_subsurface object becomes inert. Note, that destroying either
object takes effect immediately.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1211
Summary: Fixes errors in API of methods which should be const not being const.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1214
Summary:
See: https://bugreports.qt.io/browse/QTBUG-52092
Freeze happens if a sub-surface is rendered to before the main surface
is rendered. The compositor has no chance to know that this is a window
which needs to be rendered, thus the application might freeze without
ever becoming visible.
Famous example applications being affected: all kcms with a nested
QQuickView. E.g.: kcmshell5 kwineffects
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1208
Summary:
Recursively go up to the main surface, that is the top level surface
which doesn't have a parent.
This is useful to know to which surface tree a sub-surface belongs to.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1207
QtWayland doesn't commit the parent surface when creating a sub-surface.
This results in a QtWayland application to freeze as it renders to the
surface and waits for the frame rendered, which it will never get as the
Compositor waits for the commit on the parent prior to mapping the
sub-surface.
To work around this behavior, we apply the adding/removing directly.
The behavior around this is actually not fully documented, so QtWayland
is not wrong per se. See:
https://lists.freedesktop.org/archives/wayland-devel/2016-March/027540.html
Once this is properly clarified and implemented in the Client, we should
revert this change.
Differential Revision: https://phabricator.kde.org/D1191
The idea behind this signal is to notify whenever the tree of sub
surfaces changes in a way that a repaint of the Surface is required.
Possible situations are:
* surface damaged
* surface unmapped
* subsurface added/removed
* subsurface moved (position changed)
* subsurface stacking changed
Ideally it would be possible to provide the actual area which needs
repainting, but due to the possible complexity of the tree, synced
and desynced changes this doesn't look worth the effort. A user of
the signal might trigger too many repaints with it, but if it really
wants to be only notified about the actual changes, it can just track
the individual sub-surfaces.
When committing the state of a sub-surface, the state should not
be immediately applied if the sub-surface is in synchronized mode.
Instead it should be cached and only applied after the parent surface's
state is applied.
To implement this the Surface::Private has now a third cached state
buffer. When committing the state is either swapped between pending and
current or pending and subSurfacePending. Once the parent state is
applied the state is swapped between subSurfacePending and current.
The logic for applying state changes is changed. Instead of copying the
complete state object, the individual state changes are now copied and the
source gets completely reset to default values. Only the children tree is
copied back, as that list needs to be modified.
The mode is not sufficient to determine whether a SubSurface is in
synchronized mode.
Quoting spec:
"Even if a sub-surface is in desynchronized mode, it will behave as in
synchronized mode, if its parent surface behaves as in synchronized mode.
This rule is applied recursively throughout the tree of surfaces.
This means, that one can set a sub-surface into synchronized mode, and
then assume that all its child and grand-child sub-surfaces are
synchronized, too, without explicitly setting them."
The test application creates a sub-surface tree consisting of overall
three surfaces:
* blue main surface
* red sub surface
* green sub surface to the red sub surface
All surfaces are in synchronized mode. There is a timer to turn the
green surface into yellow after five seconds.
Summary:
The wrapper for wl_surface::set_buffer_scale was still missing.
Main reason for implementation is the need for the added auto-test.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1188
Summary:
The ServerSideDecorationManager gains a new event which gets sent
to the client when it binds the manager. The event indicates the
default server decoration mode used by the server. This allows the
client to know the decoration mode when it creates a decoration and
thus does not need to roundtrip to the server to get the mode.
Reviewers: #plasma, sebas
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1129
DataDevice exposes new methods to get the DataOffer provided through
drag'n'drop and also signals to indicate the various changes on the
DataDevice during drag'n'drop.
This allows to add a first basic auto test for the drag'n'drop
functionality covering both server and client side.
Summary:
How drag'n'drop works on Wayland:
When a surface has a pointer grab and a button pressed on the surface
(implicit grab) the client can initiate a drag'n'drop operation on the
data device. For this the client needs to provide a data source
describing the data to be transmitted with the drag'n'drop operation.
When a drag'n'drop operation is active all pointer events are interpreted
as part of the drag'n'drop operation, the pointer device is grabbed.
Pointer events are no longer sent to the focused pointer but to the
focused data device. When the pointer moves to another surface an
enter event is sent to a data device for that surface and a leave
event is sent to the data device previously focused. An enter event
carries a data offer which is created from the data source for the
operation.
During pointer motion there is a feedback mechanism. The data offer
can signal to the data source that it can or cannot accept the data
at the current pointer position. This can be used by the client being
dragged from to update the cursor.
The drag'n'drop operation ends with the implicit grab being removed,
that is the pressed pointer button which triggered the operation gets
released. The server sends a drop event to the focused data device.
The data transfer can now be started. For that the receiving client
creates a pipe and passes the file descriptor through the data offer
to the sending data source. The sending client will write into the
file descriptor and close it to finish the transfer.
Drag'n'drop could also be initiated through a touch device grab, but
this is not yet implemented.
The implementation in this change focuses on the adjustments for pointer.
For the user of the library drag'n'drop is implemented in the
SeatInterface. Signals are emitted whenever drag is started or ended.
The interaction for pointer events hardly changes. Motion, button press
and button release can still be indicated in the same way. If a button
release removes the implicit grab the drop is automatically performed,
without the user of the library having to do anything.
The only change during drag and drop for the library user is that
setFocusedPointerSurface is blocked. To update the current drag target
the library user should use setDragTarget. Sending the enter/leave to the
data device gets performed automatically.
The data device which triggered the drag and drop operation is exposed
in the SeatInterface. The user of the library should make sure to render
the additional drag icon provided on the data device. At least QtWayland
based applications will freeze during drag and drop if the icon doesn't
get rendered.
The implementation is currently still lacking the client side and due to
that also auto test. It's currently only tested with QtWayland clients.
Reviewers: #plasma, sebas
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1046
Summary:
The Cursor wasn't properly initialized. E.g. the damage signal didn't
get connected resulting in the server not noticing when the cursor
changes. The damage only got connected if a new cursor got instelled by
the client on the same pointer.
This change ensures that the Cursor is properly initialized by calling
into the same method as when the cursor changed.
The tests are extended by a new test case for damaging the surface.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1022
Summary:
The signal gets emitted whenever the focused PointerInterfaces gets
newly set or reset to nullptr. This is needed to better track the
current cursor image in the compositor.
Reviewers: #plasma, sebas
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1007
Summary: Convenient API to get the absolute executable path for the pid.
Reviewers: sebas, mart
Subscribers: plasma-devel
Differential Revision: https://phabricator.kde.org/D858
This patch transports the EDID data base64-encoded over the wire.
Apparently, we can't just send random QByteArrays as "strings" over, it
has to be encoded and decoded. So...
* base64-encode the data before sending to the client
* base64-decode it on the client side
* document the above, fix documentation woes in the xml definition
* change test accordingly
The test data used was actually invalid, it's a base64 string of the
actual data, so fix the tests (which actually breaks it), and encode on
the server-side and decode on the client side.
REVIEW:126380
So far we only supported mapping global to surface-local coordinates
using a 2D-offset. With this change it's possible to register a
QMatrix4x4 to describe the transformation for going from global to
surface-local coordinates in a full 3D space.
The existing 2D-offset is transformed to use the new matrix based
variant describing a translation.
REVIEW: 126271
A system isn't idle by definition below 5 sec. Before it's not possible
to properly determine whether the user is still interacting with the
system or not. Thus such a short timeout is not sufficient to determine
whether the system is idle.
Furthermore allowing short timeouts like 1 msec can be used to gather
information from the system. It would allow to reconstruct the timestamp
changes on the seat very reliable, which we do not want a Client to know.
And also this can be used to get events on each key press and key release
and the time between each of the events. This can be used to gather
statistics which would in worst case allow to reconstruct what the user
is typing. Determining where a word starts and ends should be relatively
straight forward if you know the timing. With the length of the word and
the statistics of alphabetic distribution it becomes possible to
reconstruct some words. And also individual letters. With enough
statistic and some known words one can determine how long it takes to
press a certain letter. At that point the idle interface would be a
keylogger.
To prevent such attacks the timestamp is now modified to be at least
5 sec. Why 5 sec? Because it's the smallest timestamp used in the
KIdleTime example application which I do not want to break.
5 sec are long enough to destroy this possible attack.
REVIEW: 126220
After deleting an OutputInterface the resources are not necessarily
destroyed, so unbind might still be called. The existing code just
casted the resource's user data which could then point to invalidated
memory.
This change verifies that we still have a Private* for the resource.
If not, it doesn't have to do any cleanup anyway.
REVIEW: 126097
Wrapper around wl_client_destroy. In case the ClientConnection got
created through Display::createClient we need to destroy the
ClientConnection again. The exiting client will not cause it to be
destroyed.
Reviewed-By: Bhushan Shah
This implements the server part of the screen management protocol. The
protocol is implemented as a wayland protocol.
It provides the following mechanisms:
- a list of outputs, close to wl_output, with additional properties for
enabled, uuid, edid, etc.. These OutputDevices correspond to a
connected output that can be enabled by the compositor, but is not
necessarily currently used for rendering.
- a global OutputManagement, which allows creating config objects, one
per client. The client can make changes to the outputs through
setScale(outputdevice*, scale) for example.
- an OutputConfiguration resource, that can be handed to a client and
used for configuration. Changes are double buffered here. Only after
OutputConfiguration.apply() has been called, the changes are relayed
over the global OutputManagement.
The compositor is responsible to handle changes.
For a more detailed description, see the API docs in especially
outputconfiguration.h.
REVIEW:125942
this exposes the geometry of taskbar entries in
plasma-windowmanagement, in order to make the
minimize effects possible.
unlike on X11, it takes relative positions and
it has one geometry per panel, making possible
to have multiple taskbars working.
REVIEW:125871
A transient surface can indicate through the flags that it does not
want to accept keyboard focus. This is now exposed through a dedicated
method.
REVIEW: 125552
So far transient was a mutual exclusive mode causing a transient window
to not be able to be fullscreen. This seems wrong. Let's have transient
still as a dedicated mode allowing the window to be maximized and/or
fullscreen. Only popup stays a dedicated mode.
REVIEW: 125468
On client side a setTransient method is added which wraps the semantic
of wl_shell_surface_set_transient.
On server side both set_transient and set_popup are implemented, though
for popup only the transient part is implemented. In particular the grab
is not yet handled and also no popup done is provided.
For the transient on server side the flags are ignored. Main reason is
that Qt does not use the flag, so testing whether it works is tricky
(needs a test application).
REVIEW: 125223
* wl_data_device_manager -> version 2
* wl_data_device -> version 2
* Wayland -> version 1.7
Unfortunately the client side is not yet completely correct. We
need to call wl_data_device_release only if we have a data device
of version 2. But there is no easy way to test this. To change we
will need to introduce a client side version tracking.
BUG: 352663