Especially the BlurEffect::expanded() method is called a lot.
Saves creating a temporary QVector.
Differential Revision: https://phabricator.kde.org/D9101
Summary:
Without Xwayland KWin starts so fast that the creation of the EffectFrame
triggers a crash in the Wayland integration as the KWin internal
connection isn't fully setup.
To workaround this crash the creation of the EffectFrame is delayed till
the first usage. It doesn't make sense to try to fix the actual crash as
it would require to defer the creation of all Effects.
Test Plan: New test case added which crashes without this fix.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D8821
Summary: Fixes the build with D8705
Test Plan: Just adds includes, I wonder if it should go into Plasma/5.8 and /5.11 too
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: graesslin, plasma-devel, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D8706
Summary:
Instead of calling reconfigure() on screen size changes, which deletes
and recreates the effect, we can just update the one texture that's mapped to
the screen size.
---
From the wayland commit.
>What surprises me is that BlurManager recreates for Output changes.
>That sounds like a bug in KWin (or an area which could be improved).
I had thought the same and wrote this (though wanted to have kwayland fixed first)
Test Plan:
Logged in and out (my screen resizes on startup due to scaling)
Tested on my X machine by turning a screen off. Nothing broke, plasma
panels looked the same.
Note: Eike tried this patch last week and claimed kwin still crashed.
We don't have a backtrace so it could have been something unrelated,
applied wrong or that he was deliberately lying to wind me up.
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: graesslin, plasma-devel, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D7877
Summary:
Similar to the Blur patch. Arguably rven less reason as this doesn't
have a texture the size of the workspace.
We don't need to delete and recreate the entire effect every time the
screen changes; This deletes the wayland global which causes quite a bit
of extra work for the clients.
Test Plan:
Changed resolution under X, and scale under wayland
Panel looked the same and nothing exploded
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: graesslin, plasma-devel, kwin, #kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D7937
Keeps it from loading the Svg and all the Plasma stuff (Theme etc) that comes with it on startup.
Differential Revision: https://phabricator.kde.org/D8011
Summary:
Several effects announce a support property atom on the root window. This
change forwards the KWin::Application's signal that the xcbConnection
changed to the EffectsHandler so that the effects can respond to it.
All effects which announce a support property connect to this new signal
and re-announce the property. In case the xcb connection died (future
XWayland crashing case) it is set to XCB_ATOM_NONE by that. In case the
xcb connection got created (future delayed XWayland startup) the atom is
set to the proper value.
In addition all usages of the support properties are guarded, so that no
nonesense actions are performed if the support property is XCB_ATOM_NONE.
Test Plan: Only compile tested as we don't have XFree KWin yet
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D7761
Summary:
Apparently some old configs made PresentWindows register the top left
corner which does not make any sense as that's not supported by touch.
So to be sure, don't register those edges.
BUG: 383797
FIXED-IN: 5.11
Test Plan: Not tested, I'm on Wayland
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D7508
Summary:
The PresentWindows effect does not hide the window to close the selected
window. Instead it moves it outside the visible area. As this is a
"special" KWin window it is on top of the stacking order and needs to be
ignored in the slideback effect.
Instead of doing a special casing for this window the effect is changed
to ignore windows outside the visible area in general. Windows outside
the visible area just don't make sense to block the slideback effect.
BUG: 381402
FIXED-IN: 5.10.4
Test Plan: Slideback works after using Present Windows effect
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6468
Summary:
This patch caputres from the framebuffer using the framebuffer's
geometry, factoring in scale. We then keep the current normal DPI
framebuffer causing it to downsample there.
This is good because:
- it keeps the code very simple
- it's a performance optimisation. Blurring on 4k is naturally more
expensive than at regular DPI. Downsampling keeps it the same - and you
can't see a difference given it's high DPI and you're going to blur it
anwyay.
- it keeps kernel sizes somewhat resolution independent so it will look
just as blurry across multiple screens.
::doCachedBlur still needs doing.
Test Plan:
Ran an app
Ran the kwindowsystem blur test
Observed the right part of the window being blurred
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D4963
Summary:
glReadPixels needs the correct location relative to the
framebuffer so we need to factor in the scale as well as translation
when going from compositor space.
Test Plan:
Ran the plasma colour picker plasmoid in windowed mode
Clicked on multiple parts of a window
It was right every time
Reviewers: #plasma
Subscribers: plasma-devel, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D4950
Summary:
Background contrast reads pixels from the framebuffer
we need to convert from compositor to framebuffer co-ordinates
when an output is scaled
Test Plan:
Ran the manual test in kwindowsystem. Moved window over dolphin.
Visually checked output
Reviewers: #plasma
Subscribers: plasma-devel, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D4949