Commit graph

716 commits

Author SHA1 Message Date
David Faure
31e2f9c5d7 [KWayland] Port away from deprecated API in Qt 5.14
Test Plan: Builds

Reviewers: davidedmundson, zzag

Reviewed By: zzag

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D24014
2019-09-17 14:20:17 +02:00
Frederik Gladhorn
baa1363558 Sort files alphabetically in cmake list
Summary: Adding further files is confusing, since the list is almost alphabetical.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D24002
2019-09-17 09:30:53 +02:00
Friedrich W. H. Kossebau
3e0bbe26fd Use new INCLUDE_DIRS with ecm_add_qch, to have doxygen see more includes
GIT_SILENT
2019-09-16 02:38:59 +02:00
Frederik Gladhorn
c778475f2a Improve documentation
Summary:
Some of the documentation did not say what the purpose of the
respective class was, but rather gave a tautology.
For people new to the code base it helps to mention that
DPMS is power management.

That DataDevice is for copy-and-paste and drag-and-drop is
maybe obvious to people used to X11 API, but not very clear
to most others.

When first reading the KWayland code, some explanations
help getting around.

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: romangg, zzag, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D23915
2019-09-15 20:59:53 +02:00
Frederik Gladhorn
f5d371a6bf Use const_iterator
Summary: When trivial, replace iterators with the const version.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D23917
2019-09-14 11:09:16 +02:00
Frederik Gladhorn
a942955b72 Remove capture of this in lambda
Summary: When this is not used, there is no point in capturing it.

Reviewers: #kwin, zzag, broulik

Reviewed By: #kwin, zzag, broulik

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D23916
2019-09-12 22:05:57 +02:00
David Edmundson
6568802c95 [server] Wrap proxyRemoveSurface in smart pointer
Summary:
proxyRemoteSurface is a fake wayland surface created for the drag and
drop between X and wayland clients.

The lifespan is not guaranteed to outlive the DataDevice.

Kwin closes Xwl before the other wayland client connections so it's
technically dangling for a bit when events could be dispatched.

Probably will never happen, but better to guard and be safe.

Test Plan: Compiles

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D22862
2019-08-28 18:38:25 +01:00
Roman Gilg
b8c28c8a85 [server] Use cached current mode more and assert validness
Summary:
We can use the cached current mode in one more case. Additionally make it
more explicit what a valid mode is and when to add them.

Test Plan: Relevant autotests pass. KWin Wayland nested and DRM session work.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D23535
2019-08-28 15:01:24 +02:00
Roman Gilg
77730f7fa7 [server] Cache current mode
Summary:
Instead of looping over all modes for retrieving current mode data copy it
to a separate variable.

Test Plan:
KWin auto tests pass and KScreen in Wayland nested session shows correct
information.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kde-frameworks-devel

Tags: #frameworks

Maniphest Tasks: T11459

Differential Revision: https://phabricator.kde.org/D23493
2019-08-28 13:10:27 +02:00
Roman Gilg
18ec7ff484 Implement zwp_linux_dmabuf_v1
Summary: This interface provides a way for clients to create generic dmabuf-based wl_buffers.

Test Plan: Works with weston-simple-dmabuf-drm and weston-simple-dmabuf-egl in KWin.

Reviewers: #kwin, #plasma, graesslin, davidedmundson, mart, fredrik

Subscribers: zzag, kde-frameworks-devel, romangg, plasma-devel

Tags: #frameworks, #plasma_on_wayland

Maniphest Tasks: T8067

Differential Revision: https://phabricator.kde.org/D10747
2019-08-06 21:44:45 +02:00
Vlad Zagorodniy
280a82844f Use wayland-protocols
Summary:
So far we've been copying protocol specifications from wayland-protocols
repo to kwayland repo. The main issue with copying is that we have to
keep xml files in sync manually. A better approach would be to use xml
specs straight from wayland-protocols package.

Test Plan: Compiles.

Reviewers: #kwin, #frameworks, romangg, davidedmundson

Reviewed By: #kwin, romangg, davidedmundson

Subscribers: davidedmundson, apol, romangg, asturmlechner, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D22216
2019-07-08 10:53:44 +03:00
Aleix Pol
f41fd9b9e4 --verbose 2019-06-22 14:56:52 +02:00
Aleix Pol
0d43606d40 Proof of concept of a wayland protocol to allow the keystate dataengine to work
Test Plan: Tested with both the lock screen and the keyboard indicator plasmoid

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D20191
2019-06-22 12:25:59 +02:00
Vlad Zagorodniy
fdc54a9960 Allow compositors to send discrete axis values
Summary:
So far not all v5 features were implemented because most of them are
optional. But given that XWayland needs axis_discrete event maybe it's
time to implement them.

CCBUG: 404152

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, mthw, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D18933
2019-05-17 11:52:15 +03:00
Laurent Montel
16db84d40b Use QVariant::fromValue directly 2019-05-17 07:25:01 +02:00
David Edmundson
49e0cf53d4 Implement set_window_geometry
Summary:
Used by clients to say where their true window geometry is relative to
the buffer size. Important if a client has client side shadows which
shouldn't be included for positioning tasks.

Technically this should be double buffered, but for consistency with all
other XdgShell properties this will be a task left to ShellClient.

Test Plan: Unit test

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D20595
2019-05-14 12:32:53 +01:00
Roman Gilg
a5c4c32f1c Implement wl_surface::damage_buffer
Summary:
Missing from our surface handling was the damage_buffer call introduced in
version 4 of the wl_compositor interface.

Its only difference to a normal damage call is that the damaged region is
supposed to be defined by the client in buffer coordinates instead of
surface coordinates. This damage must be tracked separately in KWayland
and on commit with the buffer transformation united with the normal damage.

Test Plan: Autotest updated.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, zzag, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D15910
2019-05-08 09:50:32 +02:00
Kai Uwe Broulik
5a9df05460 Add CriticalNotification window type to PlasmaShellSurface protocol
Differential Revision: https://phabricator.kde.org/D20628
2019-05-02 10:11:40 +02:00
Erik Kurzinger
840268aa7e Implement wl_eglstream_controller Server Interface
Summary:
This implements a wrapper class for the wl_eglstream_controller Wayland
interface. It allows clients to inform the compositor when a new EGL Stream has
been created with an Wayland surface attached as its producer. The compositor
can then bind a GL texture as the stream's consumer allowing it access to the
surface's buffer contents for presentation. The only client currently expected
to make use of this interface is the NVIDIA EGL driver when running alongside a
compositor supporting EGLStream-based buffer sharing.

Reviewers: #kwin, romangg, davidedmundson

Reviewed By: #kwin, romangg, davidedmundson

Subscribers: kde-frameworks-devel

Tage: #frameworks

Differential Revision: https://phabricator.kde.org/D18824
2019-04-15 07:25:53 -07:00
David Edmundson
6dd0e17759 Hopefully fix flaky remote access test
Summary:
We have 4 events:

buffer1 created
buffer2 created
buffer1 paramters sent
buffer2 paramters sent

Some are batched

We should connect to buffer 1's parameters being sent after the first
buffer is recieved, not in the potential event loop waiting for buffer
2.

Test Plan:
Passes locally
Haven't tested on build.k.o

Reviewers: #kwin

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D19476
2019-03-04 10:22:47 +00:00
David Edmundson
58af3e8200 Only commit XdgOutput::done if changed
Summary:
XdgOutput no-ops if one calls setLogicalSize(someSize)  and someSize
matches the last sent size

However, as we have an explicit done signal, we currently end up sending
this regardless.

This patches tracks if we've made any changes to commit in the done
event.

CCBUG: 400987

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: romangg, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D19255
2019-02-25 14:13:05 +00:00
Jan Grulich
1cb96f6439 FakeInput: add support for pointer move with absolute coordinates
Summary: For remote desktop support, we need to move with the pointer using absolute positin.

Test Plan: I tested this with xdg-desktop-portal-kde and krfb and it worked.

Reviewers: davidedmundson, graesslin, zzag

Reviewed By: davidedmundson, zzag

Subscribers: graesslin, zzag, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D18114
2019-02-14 13:44:36 +01:00
David Edmundson
7de356da21 Add explicit SurfaceInterface::commited signal
Summary:
Whilst some interfaces that are double-buffered against the wl_surface
are proxied through SurfaceInterface, some are not, most notably
XdgShell.

We need some low level signal to know when the surface has been
committed which doesn't rely on their being a damaged buffer.

Test Plan:
Unit test
Used in kwin

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D18582
2019-02-12 14:07:06 +00:00
Roman Gilg
d10ff90865 [server] Add surface data proxy mechanism
Summary:
Allows a compositor to set a proxy surface to handle drag and drop
operations place of the actual surface the drag originated from.

One proxy surface can handle multiple origin surfaces at the same time. These
need to get registered once. The active remote surface gets set when a pointer
button is pressed on the surface.

Test Plan: Manually with KWin's Xwayland DnD patches.

Reviewers: #kwin

Subscribers: davidedmundson, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D15421
2019-02-06 10:51:54 +01:00
Roman Gilg
8b99a103b1 [server] Add selectionChanged signal
Summary: This signal notifies a compositor about selection changes on a seat.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D15023
2019-02-06 09:30:42 +01:00
Vlad Zagorodniy
ba786ee2ec [server] Generate correct touch ids
Summary:
testWaylandSeat fails because the seat interface generates incorrect id
for the second touch.

Test Plan: testWaylandSeat passes.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D18628
2019-01-31 17:45:46 +02:00
Vlad Zagorodniy
0d170cecb4 [autotests] Stabilize testWindowmanagement
Summary:
In rare cases testWindowmanagement fails because the initial iconChanged
signal gets emitted after setIcon is called.

Reviewers: #kwin

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D18421
2019-01-31 17:45:19 +02:00
David Edmundson
2176e0bc3b Make XdgTest spec compliant
Summary:
Right now it worked in kwin, but was in fact breaking the spec sending
buffers before it was configured.

There also seems to be an unclearly written (but very very sensible)
rule about comitting the surface after initial properties in order to
recieve the configure event.

After these changes it works in Weston too.

Test Plan: Ran test in kwin_wayland and weston

Reviewers: #kwin

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D18577
2019-01-28 12:10:42 +00:00
Fabian Vogt
2184206c8b Add option to use wl_display_add_socket_auto
Summary:
If automaticSocketNaming is enabled, it will use wl_display_add_socket_auto
to allocate the next free socket. The resulting name can be retrieved using
socketName after a successful start afterwards.

Test Plan: Ran the new autotest, passes. kwin_wayland still uses the old behaviour.

Reviewers: #kwin, #plasma, romangg

Reviewed By: #kwin, #plasma, romangg

Subscribers: davidedmundson, zzag, romangg, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D17122
2019-01-25 13:32:03 +01:00
Vlad Zagorodniy
57e1bc0430 [server] Send initial org_kde_plasma_virtual_desktop_management.rows
Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D18521
2019-01-25 14:20:23 +02:00
Marco Martin
ee1e49ad68 Add rows info to the plasma virtual desktop protocol
Summary:
in order for the pager to work correctly and not having to use a weird mix of wayland and dbus apis, the rows
number needs to be in the protocol

Test Plan: new passing autotest

Reviewers: #plasma, #kwin, davidedmundson

Reviewed By: #plasma, #kwin, davidedmundson

Subscribers: zzag, davidedmundson, hein, kde-frameworks-devel

Tags: #frameworks

Maniphest Tasks: T4457

Differential Revision: https://phabricator.kde.org/D17691
2019-01-22 15:22:41 +01:00
Vlad Zagorodniy
5d775a4e28 [client] Wrap wl_shell_surface_set_{class,title}
Summary: We have to wrap these two requests just for convenience.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D18440
2019-01-22 10:54:05 +02:00
David Edmundson
613aeb79c5 Guard resource deletion in OuptutConfiguration::sendApplied
Summary:
A client (kscreen-doctor especially) can disconnect whilst kwin still
has an instance.

Test Plan:
Had reproducible crash on kscreen-doctor.
Now don't.

Reviewers: #kwin

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D18248
2019-01-14 17:02:21 +00:00
David Edmundson
fd4f77d884 Update @since information 2018-12-21 13:10:06 +00:00
David Edmundson
d7f23df9d5 Xdg Decoration Support
Summary:
Usual massive boilerplate.

Should allow us to remove the injection in our QPT, as Qt 5.12 implements
this protocol directly. Will probably be relevant for other toolkits as
it's more standardised than our custom one.

Client is mostly 1:1 with the protocol, server side has some tweaking to
fit with kwayland turning an event based API into a state based one.

Test Plan:
Relevant unit test
Tried in modified kwin with our QPT disabled

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D17498
2018-12-21 13:07:52 +00:00
Roman Gilg
5492ad5dc7 [server] Touch drag support
Summary: Adds functionality to do drag and drop with touch screens.

Test Plan: Manually. Autotest planned.

Reviewers: #kwin, #frameworks, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D15464
2018-12-02 21:44:33 +01:00
Roman Gilg
28a9850466 [server] Allow multiple touch interfaces per client
Summary:
The touch related code in the seat interface class has been for no apparent
reason very different to pointer and keyboard code.

This patch makes touch related code more similar and by that allows a client
to receive touch events through multiple interfaces.

Test Plan: Manually and auto tests still pass.

Reviewers: #kwin, #frameworks, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D15443
2018-12-02 21:38:07 +01:00
Laurent Montel
34f550970c Autogenerate logging file + fix categories file 2018-11-20 08:13:42 +01:00
Laurent Montel
c52c79ce3f Remove virtual keyword 2018-11-20 08:05:46 +01:00
Alexander Volkov
5259eaed03 Use lambdas instead of std::bind()
Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: bruns, davidedmundson, ivan, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D16250
2018-11-19 14:46:16 +03:00
David Edmundson
0a44f73b3e Add VirtualDesktops to PlasmaWindowModel
Summary:
VirtualDesktops with the new plurality was added PlasmaWindowManagement,
but PlasmaWindowModel was left unchanged.

In behavioural changes, setting a window to be on all running desktops
should not mark it as being set on all desktops, they are 2 distinct
pieces of information.

Test Plan: Relevant unit test

Reviewers: #kwin, mart

Reviewed By: #kwin, mart

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D16883
2018-11-15 11:56:03 +00:00
David Edmundson
08d4d5172d Update PlasmaWindowModel test to reflect VirtualDesktop changes
Summary:
Before we send the data we don't know what desktop a client is on.

It used to be neither on all desktops nor on any desktop, a corrupt
state.

After the virtual desktop changes the data will will indicate that we're
on all desktops until we're told otherwise, which is at least a valid
state.

Test Plan: Ran test

Reviewers: #kwin, mart

Reviewed By: #kwin, mart

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D16880
2018-11-15 11:56:03 +00:00
David Edmundson
310c939570 Cleanup windowInterface in tests before windowManagement is destroyed
Test Plan: Valgrind was quieter on the virtual desktop test

Reviewers: #kwin, mart

Reviewed By: #kwin, mart

Subscribers: mart, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D16877
2018-11-15 11:56:03 +00:00
David Edmundson
8dc537ff0a Delete the correct item in removeDesktop
Summary:
QList::erase will move the data underneath where the iterator is
pointing, we want to delete the entry we're about to remove from the
list.

Test Plan: Relevant tests now behave better

Reviewers: #kwin, broulik

Reviewed By: broulik

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D16885
2018-11-15 10:19:26 +00:00
David Edmundson
1414e2abcc Cleanup Virtual Desktop Manager list entry in PlasmaVirtualDesktop destructor
Summary:
Current code contains a path to cleanup
PlasmaVirtualDesktopManagementInterface's list of destops if the
PlasmaVirtualDesktop object is destroyed.

However at the time that this is run, the entry in the list is already
dangling and therefore shouldn't be used.

This patch moves the cleanup logic into the destructor of
PlasmaVirtualDesktop, however this means we need to make sure
PlasmaVirtualDesktopManagementInterface outlives the
PlasmaVirtualDesktop by performing an explicit early cleanup instead of
relying on QObject.

Test Plan: Relevant unit test still passes.

Reviewers: #kwin, mart

Reviewed By: #kwin, mart

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D16686
2018-11-13 16:16:19 +00:00
David Edmundson
800b0bece7 Correct version of newly added PlasmaVirtualDesktop interface
Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D16701
2018-11-07 16:23:59 +00:00
Roman Gilg
5b4a9eeef3 [server] Text input content hint and purpose per protocol version
Summary:
Convert content hint and purpose according to used text-input protocol version.

This way we can use different specifiers, which enables us in the future to use
the default hint of v0 and the pin purpose of v3.

Also code is cleaner when using the correctly versioned specifier names according
to the protocol version.

Test Plan: Compiles, autotest passes.

Reviewers: #kwin, #frameworks, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D16708
2018-11-07 14:40:51 +01:00
Roman Gilg
cd53ae5c28 [server] Put text-input (de-)activate, en-/disable callbacks in child classes
Summary:
The activate/deactivate and enable/disable callback functionality was in the
TextInputInterface::Private interface, but these calls are each specific to v0
and v2 of the protocol.

Since v3 will have again a different function signature, put all the callbacks
and their helper functions in the protocol version specific child classes.

Test Plan: Compiles, runs.

Reviewers: #kwin, #frameworks, davidedmundson, zzag

Reviewed By: #kwin, davidedmundson, zzag

Subscribers: zzag, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D16676
2018-11-06 13:55:09 +01:00
Roman Gilg
422e7789a6 [server] Put set surrounding text callback with uint in v0 class
Summary:
The set surrounding text request is only in v0 of text-input with uint arguments,
in v2 and v3 the call has the same signature.

To increase readability put the uint version in the v0 class implementation
and rename callbacks.

Test Plan: Compiles

Reviewers: #kwin, #frameworks, zzag

Reviewed By: #kwin, zzag

Subscribers: davidedmundson, zzag, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D16675
2018-11-06 13:49:14 +01:00
Laurent Montel
6f45c74471 Remove qt include prefixx 2018-11-06 07:22:36 +01:00
David Edmundson
d14a00b8e1 Cleanup comment typos 2018-11-05 15:05:40 +00:00
Roman Gilg
c27932ea07 [server] Put some text-input v0 exclusive callbacks in v0 class
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
2018-11-04 23:28:35 +01:00
Laurent Montel
f552ba47dc normalize signal/slot 2018-11-04 23:20:24 +01:00
Friedrich W. H. Kossebau
8079a195f5 Fix build with Qt <5.10 (no support for QCOMPARE(uint, int) 2018-11-03 19:17:52 +01:00
Marco Martin
f44ff394ba Add KWayland virtual desktop protocol
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
2018-11-01 16:34:30 +01:00
David Edmundson
2ba9f0c3ce Add unit test for subsurface input mask detection
Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: romangg, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D15900
2018-10-29 10:09:43 +00:00
David Edmundson
bd7acc0ee2 Guard data source being deleted before processing dataoffer receive event
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
2018-10-29 10:09:29 +00:00
Roman Gilg
96967485ba [server] Respect input region of sub-surfaces on pointer surface focus
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
2018-10-24 13:57:48 +02:00
David Edmundson
1955e15afa [test/xdgtest] Create/destroy popup on click
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
2018-10-20 16:38:52 +01:00
David Edmundson
4bbc085e0e [xdgshell] Add positioner constraint adjustment flag operators
Test Plan: Used in kwin

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D16318
2018-10-20 16:38:03 +01:00
David Edmundson
6414100de3 Don't silently error if damage is sent before buffer
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
2018-10-08 09:15:59 +01:00
Roman Gilg
de6f5a74ff [server] Do not return early on fail in touchDown fall back code
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
2018-09-18 21:56:43 +02:00
Kevin Funk
29b8d0f258 Minor: Add a few nullptrs 2018-09-13 09:56:34 +02:00
Kevin Funk
32d4edff51 Minor: Include Qt dirs as SYSTEM includes 2018-09-13 09:38:09 +02:00
Kevin Funk
68625a500d Minor: Fix CMake AUTOMOC warning 2018-09-13 09:38:01 +02:00
Yuri Chornoivan
96df0ea6ae Fix minor EBN issues 2018-09-12 20:49:38 +03:00
Roman Gilg
88fde0b4ce [server] Fix remote access buffer handling when output not bound
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
2018-09-11 17:40:02 +02:00
Vlad Zagorodniy
44f0d3ced0 [autotests] Compare booleans to booleans
Summary:
Compiler errors:

17:06:23 /usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: CMakeFiles/testDataDevice.dir/test_datadevice.cpp.o: in function `TestDataDevice::testDrag()':
17:06:23 /home/jenkins/workspace/Frameworks kwayland kf5-qt5 SUSEQt5.9/autotests/client/test_datadevice.cpp:290: undefined reference to `bool QTest::qCompare<int, bool>(int const&, bool const&, char const*, char const*, char const*, int)'
17:06:23 /usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: CMakeFiles/testDataDevice.dir/test_datadevice.cpp.o: in function `TestDataDevice::testDragInternally()':
17:06:23 /home/jenkins/workspace/Frameworks kwayland kf5-qt5 SUSEQt5.9/autotests/client/test_datadevice.cpp:369: undefined reference to `bool QTest::qCompare<int, bool>(int const&, bool const&, char const*, char const*, char const*, int)'

Test Plan: Ran testDataDevice, still passes.

Reviewers: #kwin, romangg, broulik

Reviewed By: broulik

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D15330
2018-09-07 16:01:21 +03:00
Yuri Chornoivan
94b5140b53 Fix minor EBN issues 2018-09-06 22:24:21 +03:00
Roman Gilg
a160143d57 [server] Do not try to create data offers without source
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
2018-09-06 15:56:15 +02:00
Roman Gilg
c9bac2d41d [server] Abort drag start on correct conditions and without posting error
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
2018-09-06 15:53:26 +02:00
David Edmundson
a225438213 Sync set/send/update methods
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
2018-08-08 18:37:09 +01:00
Daniel Vrátil
110f896acb Add serial number and EISA ID to OutputDevice interface
Reviewers: graesslin, sebas, #kwin, dvratil, romangg

Reviewed By: #kwin, romangg

Subscribers: romangg, kde-frameworks-devel, davidedmundson, plasma-devel

Tags: #plasma_on_wayland, #frameworks

Differential Revision: https://phabricator.kde.org/D10040
2018-08-08 18:37:02 +01:00
David Edmundson
84a3330bfc Fix unit test
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.
2018-08-05 18:04:53 +02:00
Roman Gilg
17832e8adc Output device color curves correction
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
2018-08-05 18:04:53 +02:00
David Edmundson
fa1b65bb5a Fix memory management in WaylandOutputManagement
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
2018-08-05 18:04:53 +02:00
David Edmundson
ec7e16c8b7 Isolate every test within WaylandOutputManagement
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
2018-08-05 18:04:53 +02:00
David Edmundson
961bcbde08 OutputManagement fractional scaling
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
2018-08-05 18:04:53 +02:00
David Edmundson
2a3b34ae6a Cleanup RemoteAccess buffers on aboutToBeUnbound instead of object destruction
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
2018-07-24 13:36:55 +02:00
Roman Gilg
a2489a4110 Support cursor hints on locked pointer
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
2018-07-23 10:54:54 +02:00
Roman Gilg
7809e83049 Reduce unnecessary long wait times on failing signal spies
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
2018-07-18 11:03:06 +02:00
Roman Gilg
d544837e91 Fix selection and seat auto tests
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
2018-07-18 11:01:22 +02:00
David Edmundson
350f572a83 Populate shell version documentation 2018-07-16 16:13:16 +02:00
David Edmundson
2f8be1089c Replace remaining V5 compat global includes 2018-07-16 14:21:30 +02:00
David Edmundson
8af1ec8885 Add XDG WM Base support to our XDGShell API
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
2018-07-16 13:50:51 +02:00
David Edmundson
7442b72b93 Make XDGShellV5 co-compilable with XDGWMBase
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
2018-07-16 13:50:51 +02:00
Bhushan Shah
cb5847e726 Fix some of cppcheck warnings
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
2018-07-04 15:54:26 +05:30
Roman Gilg
312298e2f6 [server] Send frame event instead of flush on relative pointer motion
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
2018-06-26 16:35:48 +02:00
David Edmundson
098fe1b4ca Fix XDGV6 popup test
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
2018-06-22 11:49:52 +01:00
Michal Srb
d3f15a5388 Do not cancel old clipboard selection if it is same as the new one.
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
2018-06-21 16:42:39 +02:00
Bhushan Shah
b8381f3718 Fix some spelling issues suggested by new linter tool
Reviewed-by: romangg
2018-06-15 14:33:34 +05:30
Bhushan Shah
1710d3e02c Add the arclint file in kwayland
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
2018-06-15 14:13:12 +05:30
Vlad Zagorodniy
c6a864f03e Fix 'unused parameter' warnings
Summary:
The warnings:

```
/home/vlad/KDE/src/frameworks/kwayland/src/server/xdgforeign_v2_interface.cpp: In static member function ‘static void
KWayland::Server::XdgExporterUnstableV2Interface::Private::destroyCallback(wl_client*, wl_resource*)’:
/home/vlad/KDE/src/frameworks/kwayland/src/server/xdgforeign_v2_interface.cpp:95:95: warning: unused parameter ‘resource’
[-Wunused-parameter]
 void XdgExporterUnstableV2Interface::Private::destroyCallback(wl_client *client, wl_resource *resource)
                                                                                  ~~~~~~~~~~~~~^~~~~~~~
/home/vlad/KDE/src/frameworks/kwayland/src/server/xdgforeign_v2_interface.cpp: In static member function ‘static void
KWayland::Server::XdgImporterUnstableV2Interface::Private::destroyCallback(wl_client*, wl_resource*)’:
/home/vlad/KDE/src/frameworks/kwayland/src/server/xdgforeign_v2_interface.cpp:237:95: warning: unused parameter ‘resource’
[-Wunused-parameter]
 void XdgImporterUnstableV2Interface::Private::destroyCallback(wl_client *client, wl_resource *resource)
                                                                                  ~~~~~~~~~~~~~^~~~~~~~
/home/vlad/KDE/src/frameworks/kwayland/src/server/xdgforeign_v2_interface.cpp: In static member function ‘static void
KWayland::Server::XdgImportedUnstableV2Interface::Private::setParentOfCallback(wl_client*, wl_resource*, wl_resource*)’:
/home/vlad/KDE/src/frameworks/kwayland/src/server/xdgforeign_v2_interface.cpp:439:78: warning: unused parameter ‘client’
[-Wunused-parameter]
 void XdgImportedUnstableV2Interface::Private::setParentOfCallback(wl_client *client, wl_resource *resource, wl_resource *
surface)
                                                                   ~~~~~~~~~~~^~~~~~

/home/vlad/KDE/src/frameworks/kwayland/src/server/xdgoutput_interface.cpp: In constructor
‘KWayland::Server::XdgOutputManagerInterface::XdgOutputManagerInterface(KWayland::Server::Display*, QObject*)’:
/home/vlad/KDE/src/frameworks/kwayland/src/server/xdgoutput_interface.cpp:88:81: warning: unused parameter ‘parent’
[-Wunused-parameter]
 XdgOutputManagerInterface::XdgOutputManagerInterface(Display *display, QObject *parent)
                                                                        ~~~~~~~~~^~~~~~
```

Test Plan: No more 'unused parameter' warnings.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D13501
2018-06-12 23:26:48 +03:00
David Edmundson
3f31115c3c Documentation fix 2018-06-12 12:42:51 +01:00
Roman Gilg
009017c8bd [server] Small code cleanup in SurfaceInterface
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
2018-06-10 18:04:21 +02:00
Fabian Vogt
f3d2ae59ff Fixup @since for skip switcher API
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
2018-06-06 09:15:45 +02:00
Roman Gilg
4cc008c9d2 [autotests] Fix surface destroy test
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
2018-05-29 13:51:32 +02:00
Scott Harvey
7d3deb7e68 Add "SkipSwitcher" to API
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
2018-05-22 10:27:43 -05:00
David Edmundson
73cac6211b Set @since version number for XDGOutput 2018-05-17 22:15:55 +01:00
David Edmundson
b2f7c6ea02 Add XDG Output Protocol
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
2018-05-15 12:44:54 +01:00