Summary:
My change in 304528e80b has been reported to
cause issues for PostMarketOS https://gitlab.com/postmarketOS/pmaports/issues/204
I originally submitted the change to activate Framebuffer devices
as secondary framebuffer devices are not on by default, (such as a
secondary DisplayLink device). Changing attributes usually forced
some framebuffer devices to turn on, however I have found a more
accurate way to turn on framebuffer devices, without messing with
the color layout.
Reviewers: #kwin, davidedmundson, graesslin, zzag
Reviewed By: #kwin, zzag
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D19663
Summary:
When Compositor finishes compositing, it destroys EffectsHandlerImpl,
which in its turn tries to unload all effects. But there is a problem...
EffectsHandlerImpl has platform-specific hooks to ungrab keyboard and
also stop mouse interception. Given that any call made to a virtual function
in the destructor of a base class(EffectsHandlerImpl) won't go to a derived
class(EffectsHandlerImplX11), keyboard won't be ungrabbed even if effect
that grabbed it is already gone.
BUG: 399572
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D19178
Summary:
On Wayland we cannot switch from OpenGL to QPainter compositor as this
would break any running OpenGL application. KWin registers it's
EGLDisplay to Wayland and without OpenGL this doesn't make sense any
more. We are not able to render OpenGL buffers in the QPainter
compositor.
While it's theoretically possible to switch from QPainter to OpenGL it
doesn't make any sense for the same reason. Any running OpenGL
application would be using llvmpipe and could not be switched to proper
OpenGL.
This change stores the selected compositing type in Platform and the
implementations can use it to restrict the supported compositors. On X11
we don't need this, all other Platforms implement the restriction. Thus
it's no longer possible to switch the backends at runtime.
Test Plan:
Adjusted tests run, no runtime test as gui doesn't support
switching to QPainter anyway.
Reviewers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D19084
Summary:
Despite plasma frameworks doing it's own scaling with fonts, it's been
requested to use kwin/wayland scaling.
Like DRM, when kscreen is not used, scale value is loaded from a config
file.
Config format is
[HWComposerOutputs][0]
Scale=N
The 0 is to map similarly to DRM and support multi-screen, but with a
screen index
rather than a UUID based on EDID.
Because we don't support multi screen this is always 0 for now.
Test Plan: Ran with the config value unset and with the config value at
Scale=3.
Reviewers: #kwin, romangg
Reviewed By: #kwin, romangg
Subscribers: bshah, romangg, nicolasfella, zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18810
Summary:
The virtual platform did not actually present content and spin the
compositor. Let's do this from now on , first for the EGL GBM backend.
Test Plan: All tests pass according to Vlad
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: graesslin, zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18436
Summary:
This gives us XdgOutput support a requirement now that wayland server
reports that we support it and Qt5.12 then expects it to be sent.
It also provides an easy starting point for supporting wayland scaling
and a slight step towards multi-output.
Test Plan:
Ran on phone. Got output. Turning screen on and off works.
The double tap doesn't work great, but that was true before
(via bshah's hack to build on the current state)
Reviewers: #kwin, romangg
Reviewed By: #kwin, romangg
Subscribers: romangg, nicolasfella, zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18808
Summary:
We have a mix of different doxygen comment styles, e.g.
/*!
Foo bar.
*/
/**
* Foo bar.
*/
/** Foo bar.
*/
/**
* Foo bar.
*/
/**
* Foo bar.
**/
To make the code more consistent, this change updates the style of all
doxygen comments to the last one.
Test Plan: Compiles.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18683
Summary:
Mesa requires XESetWireToEvent xlib callbacks to be called
when DRI2 is used. This is done by the GLX integration in
the Qt's xcb plugin, but Qt 5.12 initializes the GLX integration
only when required, e.g. when a window with OpenGL support is
created or when availability of OpenGL is checked.
So force initialization of the GLX integration by calling
QOpenGLContext::supportsThreadedOpenGL().
https://codereview.qt-project.org/#/c/6557/https://bugzilla.opensuse.org/show_bug.cgi?id=1120090
Reviewers: #kwin, graesslin
Reviewed By: #kwin, graesslin
Subscribers: davidedmundson, graesslin, fvogt, filipf, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18366
Summary:
Instead we depend on the surfaceless platform for which we recently
added support. Thus the plugin does not need to use gbm and udev
anymore. So simplifies a lot.
Test Plan: ctest (prior to breaking change) passes
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18160
Summary: For unit test purposes
Test Plan: Used by unit test InternalWindowTest::testScale in linked commit
Reviewers: #kwin, graesslin
Reviewed By: #kwin, graesslin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18086
Summary:
Thus we don't require vgem any more which fails with latest mesa.
Kepping the vgem variant as fallback for older systems. See T10245
Test Plan:
SceneOpenGL Test passes without init vgem, not tested with
latest mesa
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D17980
Summary:
This ensures that KWin gets the same keyboard layout config as is
configured in the session and not a default config.
BUG: 402764
FIXED-IN: 5.14.5
Test Plan:
Xephyr to verify the config is applied, otherwise completely
untested. I don't have an X session.
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D17967
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