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:
Workaround QtBug-68997
Deleting of a RenderControl/render controlled window triggers deletion
of other queued deleted items, putting KWin in a corrupt state. See Qt
bug report.
Deleting this queued means we know we don't have anything else going on
in the stack which should make this somewhat safe.
BUG: 395346
Test Plan:
Couldn't reproduce original crash. Based purely on the incomplete backtrace and code reading
Set an Aurorae theme. Closed some windows. Things still worked as before
Reviewers: #kwin, #plasma, mart
Reviewed By: #kwin, #plasma, mart
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13614
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:
QPainter doesn't render decoration shadows. It renders only
shadows provided through ShadowInterface.
With this change, painting of shadows is done in similar way OpenGL backend is
currently doing.
Before
{F5734867, layout=center, size=full}
After
{F5734870, layout=center, size=full}
Depends on D10811 (dummy decoration with shadows in autotests)
Test Plan:
* start kwin with QPainter backend enabled:
```
KWIN_COMPOSE=Q kwin_wayland --xwayland --windowed
```
* open konsole and kate:
```
DISPLAY=:1 konsole
DISPLAY=:1 kate
```
Reviewers: #kwin, graesslin, davidedmundson
Reviewed By: davidedmundson
Subscribers: abetts, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D10943
Summary:
This problem appears if shadow corner tiles are too big and
some window has size smaller than 2 * shadowTileSize.
This change tries to address the problem above by exclusing
overlapping tile parts. If there are any two overlapping corners
then tile between them(top/right/bottom/left) is not rendered.
Also, because some corner tile parts can be excluded, corner tiles
are expected to be symmetrical(i.e. if we remove right half from
the top-left tile and left half from the top-right tile and
stick them together, they still look fine, there are no misalignments, etc).
Most shadows(e.g. shadows from Breeze) have such behaviour.
No tiles are overlapping
{F5728514, layout=center, size=full}
Overlapping tiles
{F5728516, layout=center, size=full}
And this is how it supposed to be
{F5728517, layout=center, size=full}
Test Plan:
* apply D11069 to Breeze
* in System Settings/Application Style/Window Decorations, choose "Very Large" shadow size
* open Konsole
* resize it to a minimum possible size
Reviewers: #kwin, graesslin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, ngraham, anemeth, abetts, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D10811
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:
This patch implements using EGL_IMG_context_priority to request
high-priority rendering contexts if the extension is available.
EGL_IMG_context_priority is currently used in this fashion by
e.g. Android's SurfaceFlinger (RenderEngine.cpp) and libweston
(gl-renderer.c) and seems promising given this widespread
acceptance.
Reviewers: #kwin, graesslin, romangg, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D11572
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
Summary:
some drivers, like Mali have EGL_KHR_platform_gbm
but not EGL_MESA_platform_gbm
Test Plan: pending a test on rock64 board
Reviewers: #kwin, #plasma, davidedmundson, graesslin
Reviewed By: #kwin, #plasma, graesslin
Subscribers: graesslin, garg, davidedmundson, plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D10346
Summary:
The support for interactive point selection was missing. This results in
the ColorPicker dbus API always returning an error on X11. We either need
to disable the ColorPicker on X11 or add support for this functionality.
As the X11 platform basically supports selecting a point in the
interactive window selection it makes more sense to add this missing
method in the platform than to disable support of color picker effect.
BUG: 387720
FIXED-IN: 5.12.1
Test Plan:
Run KWin/X11 on Xephyr and was able to pick a color and
kill a window
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10302
Summary:
The main reason for not having it as a mandatory dependency was that BSD
doesn't support it. But as I learned recently it is available on our CI
system. So BSDs have support now.
Even more it showed that the code doesn't compile if the dependency is
missing. And there's one thing I hate: broken build configuration
options.
So let's make UDEV and libinput a required dependency and get rid of the
problems.
Test Plan: Compiles
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10057
Summary:
While investigating BUG 387313 I noticed that blending might be disabled
for subsurfaces. Blending was disabled before rendering the subsurfaces
and it is not checked whether the surfaces have an alpha channel or not.
This change addresses this problem by disabling blending after all
subsurfaces have been rendered and enabling blending if a subsurface has
an alpha channel.
Unfortunately this does not fix the investigated bug.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10060