Summary:
This change inits XInput extension, listens for touch events and
forwards them to our platform API. Thus touch events are forwarded on a
nested wayland session on X11.
Please note that I only tested this change on Xwayland.
Test Plan: Run nested kwin_wayland with two outputs and looked into debug console
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D17369
Summary:
This brings KWin a step closer to be run from build dir without having
to install at all. The integration tests are adjusted so that the
virtual platform is still found which makes the code be closer to what
is used in normal kwin_wayland.
Test Plan: ctest passes, manually verified correct plugin is loaded
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D17388
Summary:
The current refresh rate is stored in OutputInterface. Move the getter
therefore in the AbstractOutput class.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16793
Summary: Removes unneeded includes and reorders the code in a sensible way.
Reviewers: #kwin
Subscribers: davidedmundson, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16792
Summary:
Set the mode in AbstractOutput and call into the plugin
for final change on hardware.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, kwin
Tags: #kwin
Maniphest Tasks: T10016
Differential Revision: https://phabricator.kde.org/D16786
Summary:
Wayland output is on protocol level and not dependent on the hardware
platform. Next steps are to do the same for output device and then let
the virtual output call into these initializing functions as well.
Test Plan: Manually and auto test.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16783
Summary: At least one test requires the physical size to be set.
Test Plan:
Lock screen screen edges test is passing again. Without the change the corner
offset in the ScreenEdges class is not calculated correctly via the
physicalDpiX() and physicalDpiY() values of an auxilliary QWidget.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D15183
Summary:
With the new Output class we can set the gamma directly here. This is also
a stepping stone to adjust individual output gamma adjustment later on.
This means any future backend, which aims to support the color correction
frontend needs to use the Output class.
Test Plan: Night Color test still passes.
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D11803
Summary:
Let VirtualOutput be a child class of the new generic class Output.
This allows code sharing and a very similar behavior of the Virtual backend
in comparision to the Drm backend.
Test Plan:
Autotests succesful with two exceptions: The decoration input test fails on
testDoubleTap, row topLeft. This is to be expected because now the
ScreenEdgeInputFilter captures the event at position (0,0) before the
DecorationEventFilter can capture it. The autotest was adapted to take this
special case into account.
Also the lockscreen test fails, because the virtual output is currently missing
the physical size yet.
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D11789
Summary:
Lift high-level properties into new Screens child class for platform plugins
using the Output class.
Directly make DrmScreens a child class of OutputScreens.
Test Plan: Manually and auto tests with 94%.
Reviewers: #kwin
Differential Revision: https://phabricator.kde.org/D11782
Summary:
In order to separate high-level properties of individual outputs from
hardware-specific ones and access these, introduce a new generic class Output.
Also make the DrmOutput class directly a child class of this generic class.
The long-term goal is to get rid of the Screens global object on Wayland and
instead directly work with Output objects on compositing level.
This should enable us long-term to do direct scanout to hardware planes, what
I predict needs this generic output representation at one point.
Test Plan: Manually.
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D11781
Summary:
Weston does something similar
https://cgit.freedesktop.org/wayland/weston/tree/libweston/compositor-fbdev.c#n315
...and it seems that the non-primary framebuffer devices start completely off. (the screen is off on my Displayport device, and the window for the second vga card in qemu is much smaller than the primary one, and all black for my qemu vm) .
In my testing, sending the ioctl FBIOPUT_VSCREENINFO with a *changed* &varinfo allows it to wake up, and turns on the screen.
doing FBIOGET_VSCREENINFO and then FBIOPUT_VSCREENINFO in my testing does not work.
I think really the values that end up getting changed are varinfo.transp.offset and varinfo.transp.length. at least on the qemu system, but in this patch I am aligning all of them for completeness, because the drivers might do it differently for qemu
Test Plan: This causes the window for /dev/fb1 (remote-viewer, and a qemu vm with two "VGA" (bochsdrm) cards) to resize from the smaller size when specifying it as the --fb-device on seat0, and kwin draws on the device.
Reviewers: #kwin, davidedmundson, graesslin
Reviewed By: #kwin, graesslin
Subscribers: zzag, davidedmundson, rkflx, graesslin, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D9572
Summary:
The kwin code was written to treat scale as non integers, we just need
to switch to the relevant float version of methods.
Test Plan:
Used kscreen-doctor to change this
Konsole resized as appropriate
Plasmashell was all broken, but that's expected until QScreen::size is based on the
xdg-output virtual size
Reviewers: #kwin, mart, graesslin, romangg
Reviewed By: #kwin, mart, graesslin
Subscribers: romangg, zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13616
Summary:
To do so leaves a dangling pointer on our pageFlipHandler
BUG: 396272
Test Plan: Wobbled a window whilst plugging a monitor in and out
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D14210
Summary:
We pass the buffer scale of the cursor through QImage::devicePixelRatio.
When copying the cursor with QPainter use Qt's in-built functionality to
handle resizing the cursor pixmap as necessary to match the screen.
As we're now resizing the cursor, the hotspot needs translating from
logical to device co-ordinates.
Test Plan: Used with associated patches
Reviewers: #kwin, graesslin
Reviewed By: #kwin, graesslin
Subscribers: graesslin, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13605
Test Plan:
Ran kwin_wayland --windowed --scale2
Hovered over deco. Got massive and detailed cursor
Hovered over a wayland client (Qt 5.11 not dev)
Got a massive, but slightly blocky cursor
Reviewers: #kwin, graesslin
Reviewed By: #kwin, graesslin
Subscribers: zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13642
Summary:
Instead of seeing the cursor <--> on the left edge you now see an icon
that looks like |<- .
This brings kwin decorations in line with GTK CSD icons.
In theory this is also useful to tell which window will resize in the
case of side-by-side windows (regardless of whether borders are on or
not). In practice with the adwaita icon theme I tested with it's not
very intuitive to realise which is which till you learn the icon.
Change is more involved than it should be as Qt::CursorShape doesn't
have these entries, and I don't want to shadow that enum internally or
have
to change kwin effect code.
Specifics depend on cursor icon theme if they are not present it will
fallback to the <--> icon. (Breeze does not have them currently)
Test Plan:
Resized some windows (on X and on Wayland)
Correct icon appeared on Adwaita
Existing icon appeared on Breeze
Reviewers: #plasma
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13396
Summary:
The drm platform has a special handling for touch events while the
screen is in dpms. All touch events are filtered out, but a double
tap wakes up the screen.
Due to the filtering out of the events the idle timers were not reset.
So if you only double tapped, the screen turned on, but not off again.
This change updates the timestamp after double tap, so that the idle
timers are restarted. All other events are still filtered out, to not
have "fake" events (e.g. smart phone in pocket) wake up the device.
BUG: 392754
FIXED-IN: 5.12.6
Test Plan: only compile tested
Reviewers: #kwin, #plasma
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D12668
Summary:
Changing the creation of the nested window from unstable v5 to v6 in
order to be supported on more compositors and to use KWin's better
supported platform.
Targeting 5.12 as this will help to remove support for unstable v5
from KWayland.
Test Plan: Run a nested KWin/Wayland on KWin/Wayland, everything looked fine
Reviewers: #kwin, #plasma
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D11806
Test Plan:
Very minimal expansion of unit tests which uses WaylandScreens
Wrote mini app to debug actual output of xdg-output for testing the DRM code
Main relevant user of this is xwayland > 1.20 which I don't have, so that
part remains untested
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: romangg, graesslin, bshah, kwin
Tags: #kwin
Maniphest Tasks: T8501
Differential Revision: https://phabricator.kde.org/D12243
Summary: TTYs are only available for seat0, so when starting a framebuffer kwin on seat1, it never draws, because drawing is always suspended, because it is being treated as not active
Test Plan: The framebuffer backend draws on seat1, and /dev/fb1 and when I switch back to my Weston greeter, (when it's also using the frame buffer,) it doesn't try to draw on top of it.
Reviewers: #kwin, graesslin
Reviewed By: #kwin, graesslin
Subscribers: davidedmundson, rkflx, graesslin, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D9574
Summary: The warning that the format is unknown was being logged unconditionally
Reviewers: #kwin, bshah
Reviewed By: #kwin, bshah
Subscribers: rkflx, graesslin, cfeck, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D9567
Summary:
Qt objects are treated as identities so remove the copy constructor and
an assignment operator. See, http://doc.qt.io/qt-5/object.html#identity-vs-value
IIRC some Qt objects(like QImage) have copy constructor for implicit data sharing,
but VirtualOutput doesn't have anything to share.
Also, it [this patch] fixes a compiler warning:
```
/home/vlad/KDE/src/kde/workspace/kwin/plugins/platforms/virtual/virtual_output.cpp: In copy constructor ‘KWin::VirtualOutput::VirtualOutput(const KWin::VirtualOutput&)’:
/home/vlad/KDE/src/kde/workspace/kwin/plugins/platforms/virtual/virtual_output.cpp:30:1: warning: base class ‘class QObject’ should be explicitly initialized in the copy constructor [-Wextra]
VirtualOutput::VirtualOutput(const VirtualOutput &o)
^~~~~~~~~~~~~
```
Reviewers: #kwin, romangg
Reviewed By: #kwin, romangg
Subscribers: michaelh, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D12214
Do not blindly select first EGL config from returned list, but choose the one that matches GBM surfaces, that will be created later.
GBM surfaces are created with GBM_FORMAT_XRGB8888 format, so choose the config that matches it.
With wrong format EglGbmBackend::resetOutput() will later fail with error EGL_BAD_MATCH.
Test Plan: Compile, run startplasmacompositor. Verify that OpenGL compositing is used, either by kwin debug console, or by kwin support information.
Reviewers: graesslin, davidedmundson, #kwin, #plasma_on_wayland, bshah
Reviewed By: davidedmundson
Subscribers: zzag, kwin, #kwin
Tags: #kwin, #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D11758
Summary:
Do not blindly select first EGL config from returned list, but choose the one that matches GBM surfaces, that will be created later.
GBM surfaces are created with GBM_FORMAT_XRGB8888 format, so choose the config that matches it.
With wrong format EglGbmBackend::resetOutput() will later fail with error EGL_BAD_MATCH.
Test Plan: Compile, run startplasmacompositor. Verify that OpenGL compositing is used, either by kwin debug console, or by kwin support information.
Reviewers: graesslin, davidedmundson, #kwin, #plasma_on_wayland, bshah
Reviewed By: davidedmundson
Subscribers: zzag, kwin, #kwin
Tags: #kwin, #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D11758
Summary:
Implements a KWayland protocol to pass GBM fd from KWin to KRfb and
addictions to relevant projects from both sides.
Note that this patch does not affect default behaviour of mentioned projects. It can be used
only with KWIN_REMOTE=1 in env from KWin side and with preferredFrameBufferPlugin=gbm in krfbrc from
KRfb side. In all other aspects app behaviour remains unchanged.
Test Plan: Launched KWin in Wayland mode, launched KRfb in it, launched KRDC on a laptop, connected in read-only mode, observed a correctly retrieved desktop with Krfb window
Reviewers: graesslin, davidedmundson, romangg, #kwin
Reviewed By: davidedmundson, romangg, #kwin
Subscribers: kossebau, jgrulich, romangg, ngraham, alexeymin, aacid, kwin, #kwin, davidedmundson, plasma-devel
Tags: #plasma_on_wayland, #kwin
Maniphest Tasks: T5653, T7785
Differential Revision: https://phabricator.kde.org/D1230
Summary:
Since VirtualOutput is a QObject, store it per reference and not per value.
Also fix some compilation warnings.
Test Plan: Before and after 92% tests passed.
Reviewers: #kwin, davidedmundson
Reviewed By: davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D11581
Summary:
This matches the DRM backend more closely and allows mid-test removal and
addition of virtual outputs with different properties in the future.
Test Plan: Before and after 93% tests passed.
Reviewers: #kwin, graesslin
Reviewed By: #kwin, graesslin
Subscribers: graesslin, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D11351