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