Commit graph

10 commits

Author SHA1 Message Date
Roman Gilg
e8fada8a36 Get name and refresh rate from output device
Summary:
We can simplify the AbstractWaylandOutput code some more by getting name and
refresh rate of an output from the always available output device object.

Test Plan: Tested with DRM, Wayland nested and virtual backends.

Reviewers: #kwin

Subscribers: davidedmundson, apol, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23546
2019-08-29 16:04:09 +02:00
Roman Gilg
f2c5f85cae Assure wayland output interface creation path
Summary:
The Wayland and XDG output interfaces are created or destroyed when the
output is en- or disabled. This follows a clear path of dependencies and
we should not check if this is indeed the case but instead assert on it.

Test Plan: Nested Wayland and Drm sessions.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23540
2019-08-28 18:33:00 +02:00
Roman Gilg
331f5d7da7 Get output physical size from output device
Summary:
Get the physical size directly from the always available output device
interface instead of saving an additional copy in the abstract wayland
output class.

There is some ambiguity with orientation and naming that needs to be
cleaned up when output orientation is reworked.

Test Plan: Nested Wayland, Drm, virtual backends tested.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Maniphest Tasks: T11459

Differential Revision: https://phabricator.kde.org/D23496
2019-08-28 14:56:26 +02:00
Roman Gilg
dbb2cede08 Get output pixel size from output device
Summary:
Get the pixel size directly from the always available output device
interface instead of saving an additional copy in the backends.

Test Plan: Nested Wayland, Drm, virtual backends tested.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Maniphest Tasks: T11459

Differential Revision: https://phabricator.kde.org/D23495
2019-08-28 14:54:14 +02:00
Roman Gilg
819609a8a6 Get output position and scale from output device interface
Summary:
Let the data saved in OutputDeviceInterface be the single source of truth
and as low hanging fruits first do this for global position and scale.

Test Plan: Nested Wayland, Drm, virtual backends tested.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Maniphest Tasks: T11459

Differential Revision: https://phabricator.kde.org/D23489
2019-08-28 14:51:12 +02:00
Roman Gilg
0bcfb4d609 Rely on output device existence
Summary:
For every abstract wayland output an output device interface is created
by the backend directly after instance creation. We can therefore rely on
its existence and remove superfluous checks.

Test Plan: Relevant auto tests pass. Wayland nested and DRM sessions tested.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Maniphest Tasks: T11459

Differential Revision: https://phabricator.kde.org/D23486
2019-08-28 14:48:28 +02:00
Roman Gilg
0301c0866a Emit mode-change on all relevant changes
Summary:
The EGL GBM backend must be informed about mode changes so that the surface
gets reset. This fixes mode changes for me. Rotations still not work, this
needs some more structure cleanup.

Test Plan: Manually changed resolution and scale alone and together with KScreen.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23435
2019-08-26 12:41:42 +02:00
Roman Gilg
9bf7cbc7f6 Remove change-set null check
Summary:
It is unnecessary to check if the change-set is null when looking at the
KWayland code. Also the check would be useless at the moment anyway because
before the check we access the change-set already in the DRM backend and at
the check we would not return if it would be null.

Test Plan: Relevant auto tests pass.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23428
2019-08-26 12:38:23 +02:00
Roman Gilg
6ac1585e12 Fix xdg-output creation
In 1a11abc821 some function calls in the createXdgOutput function were
accidentally removed resulting in possibility of broken setup on startup.

Add these calls back again.
2019-06-14 12:10:28 +02:00
Roman Gilg
1a11abc821 [platforms/x11/standalone] Port to AbstractOutput
Summary:
Represent outputs in the X11 session via AbstractOutput. For that we
move all Wayland specific parts of AbstractOutput into a new subclass
AbstractWaylandOutput and let the outputs of our Wayland backends inherit
from there.

This should allow us to get rid of the Screens class later on.

Test Plan: Manually in X session.

Reviewers: #kwin, zzag, davidedmundson

Reviewed By: #kwin, zzag, davidedmundson

Subscribers: ngraham, zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D19208
2019-06-13 11:39:25 +02:00