20572 Commits (81905dbfaa75a4d616655064fc1952caab517350)
 

Author SHA1 Message Date
Aleix Pol 5f16757090 libinput: Make sure we don't crash if we start without an output 3 years ago
Aleix Pol 4dca6408c2 tablet: Provide the position when proximity-in hits 3 years ago
Vlad Zahorodnii 4a69ca4146 Remove pointer focus handling in TabletInputRedirection
Handling pointer focus in TabletInputRedirection makes no sense and it
messes with state set by PointerInputRedirection, which is really bad.
3 years ago
Xaver Hugl 15993fa6bb backends/drm: fix KWIN_DRM_NO_AMS env var
It currently makes the session not start at all
3 years ago
Arjen Hiemstra e5ca5df0c5 autotests: Use a shared library for the integration test framework
Ever since the effects were changed to static, each test of the
integration tests includes all the effects. The result of this is that
when doing a debug build each test is now 60MiB or more. With the amount
of tests, this results in ~8 GiB of diskspace used just for KWin's
binary output directory, which is rather excessive.

Since the tests all share a common framework library, we can change that
library to a shared library and that way avoid linking all the effects
into each test.

Most of this is shuffling around some link libraries in the integration
test CMakeLists, however, I needed to export the Xwayland class as it is
used by one of the tests but wasn't exported.
3 years ago
Vlad Zahorodnii cbad78a360 Kill Toplevel::screenScale()
Tracking AbstractOutput properties in Toplevel is not extensible. Since
DecorationItem is the only one who needs Toplevel::screenScale(), make
it track the output device pixel ratio.
3 years ago
Vlad Zahorodnii 1f318a2245 effects/zoom: Rework how cursor texture is managed
Update the cursor texture on demand to avoid changing the current opengl
context in the middle of compositing cycle.

CCBUG: 445412
3 years ago
Vlad Zahorodnii 95caa51536 autotests: Add breeze-icons to .kde-ci.yml
Some tests need it, e.g.

FAIL!  : TestXdgShellClient::testDesktopFileName() Compared values are not the same
   Actual   (c->icon().name())         : ""
   Expected (QStringLiteral("wayland")): "wayland"
3 years ago
Vlad Zahorodnii eba4ab10e1 autotests: Add breeze to .kde-ci.yml
Some tests need it, e.g.

FAIL!  : TestDontCrashUseractionsMenu::initTestCase() 'kwinApp()->setStyle(QStringLiteral("breeze"))' returned FALSE. ()
   Loc: [/builds/plasma/kwin/autotests/integration/dont_crash_useractions_menu.cpp(57)]
3 years ago
Vlad Zahorodnii 57f8faeb41 autotests: Fix TestPluginEffectLoader
PluginEffectLoader was changed so that it queries and loads all effects
immediately.
3 years ago
Vlad Zahorodnii dcd9a7b9ea autotests: Use Smart placement by default
Many tests were written with the smart placement in mind and fail now
because the default placement policy was changed to "centered"
3 years ago
l10n daemon script 3bb3c604c8 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
3 years ago
l10n daemon script 20e5fc62b1 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
3 years ago
Nicolas Fella 1d95dd3eaf Add GitLab CI 3 years ago
Vlad Zahorodnii dc3d0444e4 Drop Screens::displaySize()
It's the same as the workspace geometry, i.e. the bounding geometry of
all outputs.
3 years ago
Vlad Zahorodnii 3ad7bf01c8 Allow specifying scene geometry
The main motivation behind this change is to decouple the scene a bit
further from Screens, which is also obsolete.
3 years ago
l10n daemon script e20c9e7099 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
3 years ago
Vlad Zahorodnii 4a1d5ea53c backends/drm: Improve PauseDevice/ResumeDevice signal handling
systemd takes care of setting and dropping master permissions when
sending PauseDevice and ResumeDevice signals.

When the ResumeDevice signal is received, the relevant drm device should
already have master permissions set up.

On the other hand, when the active property changes, there's still a
chance that systemd haven't granted drm master permissions to us.
3 years ago
Xaver Hugl 3a5cb1c441 backends/drm: only set pageflipPending when wanted
It shouldn't be set when the pipeline wants to be disabled. Whenever that
happens it will wait forever for the pageflip that doesn't come
3 years ago
Arjen Hiemstra dda45a7829 Overview: Only trigger middle click close with mouse/pen
For some reason, while touch doesn't have a middle button, the
taphandler for middle click close still triggered on tap. So make it
explicitly only support mouse/pen so we exclude touch events.

BUG: 445755
3 years ago
Vlad Zahorodnii 9f93358bc1 backends/drm: Notify about failed frames if there are actually pending frames
In case a modeset needs to be performed, the drm backend will test all
pipelines to ensure that new mode won't cause any bandwidth issues on
other outputs, etc.

To do that, it may delay presenting frames. If the new configuration
doesn't work, it needs to notify about failed frames.

However, the relevant code that notifies the RenderLoop about failed
atomic commits doesn't check if there's actually a pending modeset
present.

When switching between VTs, systemd can revoke master permissions from
kwin. To make things even more trickier, kwin can try to present a frame
in that short time span.
3 years ago
Vlad Zahorodnii d92bbdb2be effects/overview: Load close button in WindowHeap on demand
For many windows it will be invisible, so there's little point for
creating it ahead of time. Another reason for loading the close button
on demand is that Plasma components are typically heavy.
3 years ago
Vlad Zahorodnii 4881dd63a7 kwineffects: Make OffscreenQuickView generate double click events
Currently, MouseArea.doubleClicked doesn't work in QtQuick effects.
Luckily, the overview effect doesn't use it, but it's still worth making
sure that it works as expected regardless of whether it's a kwin effect.

With this change, the OffscreenQuickView will keep track of the last
mouse press event. If the second button press occurs within the mouse
double click interval, the OffscreenQuickView will generate a
QEvent::MouseButtonDblClick event, similar to what QGuiApplication would
normally do when processing window system events.
3 years ago
Vlad Zahorodnii 00273f10ff scripting: Use Toplevel::isOnOutput() in ClientFilterModel
This way, the ClientFilterModel will work as expected if there are
overlapping/cloned outputs.
3 years ago
David Edmundson 0f71b27c71 Ensure binary effects are loaded before cleints
The current code performed two functions:
 - metadata was read async
 - the event loop is spun between each effect loading

After we merged static and binary plugins this caused a problem for
things like blur and background contrast where loading an effect
influences what we advertise as supported. We don't want plasmashell to
have to reload all it's SVGs.

All KDE provided binary plugins are statically bundled so querying for
plugins is super duper fast anyway. It's not the same kbuildsycococa
path that it used to be.

The C++ plugins tend to be considerably faster in their constructor than
scripted counterparts, and if anything should be loaded lazily it can be
handled inside the effect.
3 years ago
Alexander Lohnau 70a2fb877a Register KWin effect macros for moc
Otherwise we get lots of moc warnings about there not being any relevant macro used
3 years ago
Alexander Lohnau b1e121397d GIT_SILENT Make kwin effects namespace not end with trailing slash
For the static plugins an exact string match is required
3 years ago
Alexander Lohnau f61097f3cb Remove now unneeded static effect loader class 3 years ago
Alexander Lohnau 66352bfc87 Utilize KCoreAddons infrastructure for static plugins 3 years ago
Vlad Zahorodnii f1e96676ef Remove boolean trap in AbstractClient::isShown()
Check shaded state where needed.
3 years ago
Ismael Asensio 9b3dfe2158 [WindowThumbnailItem] Expose the client's frameGeometry as implicit size
Set the implicit size of the item to the client frameGeometry size.

This is also more convenient for tabbox usage than accessing it through the
client's property, had a proper notify signal and abstracts it from the
implementation.

It also can be mimicked by the preview ThumbnailItem used in the tabbox KCM,
which has no client property.
3 years ago
Ismael Asensio 08f6e28a1d [kcm/tabbox] Add missing property to mock ThumbnailItem
The TabBox preview uses a mock WindowThumbnailItem mimicking the
real item, but it was missing the `sourceSize` property, preventing
some effects to be previewed if they use it.
3 years ago
Vlad Zahorodnii 4a62109f59 effects/overview: Honor panel's hidden state
If a panel is hidden, don't show it.
3 years ago
Vlad Zahorodnii 0b04db866a Add AbstractClient.hidden property
To be used in the overview effect.
3 years ago
Vlad Zahorodnii 3dfbd04396 effects/overview: Port to QuickSceneEffect 3 years ago
Vlad Zahorodnii 09f323a21a kwineffects: Add QuickSceneEffect type
This change moves some pieces of the Overview effect in a new
QuickSceneEffect class that can be useful for other QtQuick based
effects.

The QuickSceneEffect class is meant to deal with rendering bits, input
handling, etc.

As the user of the QuickSceneEffect class, you need to override the
createView() method. The createView() method is invoked by the
QuickSceneEffect when it wants to create a QtQuick scene for the given
screen.

The design of the QuickSceneEffect is based on the Overview effect.
3 years ago
Vlad Zahorodnii ec5950aedb Rename EffectQuickScene to OffscreenQuickScene
EffectQuickScene is not used strictly by effects, aurorae decorations
use it too to render window decorations.

This change renames the EffectQuickView/Scene to
OffscreenQuickView/Scene to clear up the naming scheme.
3 years ago
Fushan Wen 1719c9cc07 Enable using stylus to switch focus and operate on the decoration
Add `tabletToolEvent()` to DecorationEventFilter class so it can handle
tablet events.

Add `tabletToolEvent()` to MoveResizeFilter class to avoid incorrect
titlebar highlight after a window is resized by using a stylus.

Add `tabletToolEvent()` to WindowActionInputFilter class so window focus
can be changed by clicking on the window content area when using a stylus.

Add `update()` to `TabletInputRedirection::tabletToolEvent()` to enable
switching window focus by using a stylus.

BUG: 432104
3 years ago
Vlad Zahorodnii 337261bbf7 effects/slidingpopups: Remove slide manager global with a delay 3 years ago
Vlad Zahorodnii be183cd55b effects/contrast: Schedule contrast manager removal with a delay
This prevents flickering behind plasma panels after changing compositing
settings.

If the contrast effect is disabled, the destructor of the ContrastEffect will
start the contrast manager remove timer. When it expires, the contrast manager
global will be removed and it will be finally destroyed after 5s (to work
around the wl_global race condition).

If compositing is toggled, the destructor of the ContrastEffect will start
the remove timer and the constructor of the ContrastEffect will stop the
timer, the contrast manager object will be unaffected.

The contrast effect has no options that could affect the shader, so the
reconfigure() method was removed.
3 years ago
Vlad Zahorodnii 76db5d76e7 effects/blur: Schedule blur manager removal with a delay
This prevents flickering behind plasma panels after changing compositing
settings.

If the blur effect is disabled, the destructor of the BlurEffect will
start the blur manager remove timer. When it expires, the blur manager
global will be removed and it will be finally destroyed after 5s (to work
around the wl_global race condition).

If compositing is toggled, the destructor of the BlurEffect will start
the remove timer and the constructor of the BlurEffect will stop the
timer, the blur manager object will be unaffected.

The blur effect options don't affect the generated shader code, so the
shader status check was removed in reconfigure().
3 years ago
David Edmundson 190a92bc3f set EGL_NV_robustness_video_memory_purge where applicable
This enables kwin to get notified when a memory has been lost in the
system, allowing the driver to purge all the memory and have kwin create
new contexts.

This matches what we do on GLX.
3 years ago
David Edmundson 8febb1f343 Check for extensions in logic for global contexts
The current code for creating the root shared context is very naive and
does not take into account aspects like robustness or versions.

It is not always possible to mix attributes, in particular robustness
meaning we are unable to opt into these features in future contexts.

This refactors everything to use a common path to make all contexts.
3 years ago
Xaver Hugl c4dcbb40d6 properly fix bsd build 3 years ago
Ismael Asensio 5e17de0ffd kcm/kwinrules: Port away from DelegateRecycler
We want to port from this compontent in general, as the ListView can reuse items
directly and it's a bit less bug-prone.

CCBUG: 445806
FIXED-IN: 5.24
3 years ago
Xaver Hugl 912b7d0b02 fix freebsd build 3 years ago
Xaver Hugl c4d50e984f backends/drm: drop some unused stuff in DrmGpu 3 years ago
Xaver Hugl 95f64a7ac7 backends/drm: drop DrmBackend as a friend of DrmOutput
It's unused
3 years ago
Xaver Hugl cd8a7ac0b0 backends/drm: don't make DrmGpu a friend of DrmOutput
Making the constructor and updateModes private isn't necessary
3 years ago
Xaver Hugl 6cea76bfaf backends/drm: inline DrmPipeline::updateProperties
It's only used in one place
3 years ago