Commit graph

11 commits

Author SHA1 Message Date
Aleix Pol
306f242ac8 Port namespaces and includes 2020-04-29 16:56:38 +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
Friedrich W. H. Kossebau
6f69a44e2a Use K_DOXYGEN instead of deprecated DOXYGEN_SHOULD_SKIP_THIS
GIT_SILENT
2020-01-23 12:20:45 +01:00
David Edmundson
01cace30dd Don't crash if a client (legally) uses deleted global contrast manager
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
2017-09-20 14:17:46 +01: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
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
908f86f299 [server] Don't destroy resource from dtor of a Resource sub class
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
2016-05-30 08:15:33 +02:00
Martin Gräßlin
bbfdf3f72a [server] Make s_version a static member of private class
Follows a useful change added in the kwaylandScanner tool the
s_version becomes part of the Private class.

Also fixes the related generation in the tool.
2015-09-10 09:23:36 +02:00
Martin Gräßlin
5e3bb70612 Fix doxygen generation
Doxygen doesn't like our callback listener at all. We need to hide
it from doxygen, otherwise docu doesn't get generated.
2015-09-09 16:39:50 +02:00
Martin Gräßlin
a074f84cf1 Add dedicated destructor requests to blur and contrast interface
Better resource management.

REVIEW: 125114
2015-09-09 09:42:32 +02:00
Marco Martin
47d7a79f9d add missing files for the contrast effect 2015-09-03 16:27:20 +02:00