Commit graph

13 commits

Author SHA1 Message Date
Vlad Zahorodnii
34982850e2 Destroy all clients before destroying wl_display
One of the most disappointing things when writing autotests is dealing
with a race condition where destructor requests are processed after all
globals have been destroyed.

With this change, the Display object will destroy all clients and their
resources before destroying the wl_display object. The good thing about
doing so is that shut down logic becomes simple. We don't have to assume
that wl_resource objects can outlive their wl_global objects, etc. The
bad thing is that it exposed a couple of pre-existing latent bugs in the
data device and the xdg foreign code.

closes plasma/kwayland-server#2
2020-11-11 09:26:57 +02:00
Vlad Zahorodnii
33f4254bd1 Port the wl_compositor wrapper to the new approach 2020-07-15 11:05:59 +03:00
Adrien Faveraux
095edbed4c migrate Contrast to new approach 2020-07-14 18:24:24 +00:00
Aleix Pol
306f242ac8 Port namespaces and includes 2020-04-29 16:56:38 +02:00
Aleix Pol
5d4cd7dcd3 Fix build 2020-04-29 15:59:23 +02:00
Andreas Cord-Landwehr
9267f146fd KWayland: Convert license headers to SPDX
Summary:
Convert license headers to SPDX expressions and add license files as
required by REUSE specification.

Reviewers: zzag

Reviewed By: zzag

Subscribers: kde-frameworks-devel

Tags: #frameworks

Maniphest Tasks: T11550

Differential Revision: https://phabricator.kde.org/D28058
2020-03-16 19:57:44 +01:00
Laurent Montel
6f45c74471 Remove qt include prefixx 2018-11-06 07:22:36 +01:00
Marco Martin
cd77833c3b add .data() to qpointer access
fix build on old gcc versions
2016-06-30 16:45:29 +02:00
Martin Gräßlin
5232dc5f0f [server] Don't destroy ContrastInterface when parent SurfaceInterface is destroyed
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
2016-06-01 07:32:03 +02:00
Martin Gräßlin
b0b5e16667 [autotest] Prepare TestContrast for multiple test cases
Registry was not per test case, cleanup didn't clean up everything,
etc. Basically adding a second test case resulted in a crash.
2016-05-30 10:03:19 +02:00
Martin Gräßlin
ab98448fec [server] Standardize the destructor request handling for Resources
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
2016-05-30 08:16:07 +02:00
Martin Gräßlin
65a79d98da [autotests] Switch all tests to GUILESS_MAIN 2015-11-11 08:36:31 +01:00
Marco Martin
1f4beb0334 Wayland protocol for background contrast
new wayland protocol used to define regions behind a window
in which the kwin background contrast effect should be applied
REVIEW:125030
2015-09-03 16:12:23 +02:00