20440 Commits (f4b870977be9966c10c4f3f9db6d20500fc0a6ea)
 

Author SHA1 Message Date
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
Xaver Hugl 3e24bc008a backends/drm: force soft cursor if image creation fails
If the soft cursor is only set but not forced then KWin will try to update
cursors again, making it go into code paths that will crash.

BUG: 445507
3 years ago
Xaver Hugl 50c39e202b backends/drm: properly check for vrr property with legacy
BUG: 445907
3 years ago
Alexander Lohnau 468acd0cbe Fix determining of scripted effect config from KPluginSelector
In the KPluginSelector we don't have the possibility to set the args for
each KCM. Because of that we use the metadata of the KPluginFactory as a
fallback to read the plugin keyword, which specifies the KCM we want to display.

This requires kcmutils 54b196a9bad88732debe0b49111af4755268f09f, which landed in the last release.

BUG: 445667
3 years ago
l10n daemon script 16d473a326 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 f07c66f040 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 045c1337a9 effects/overview: Make Esc key handling more intuitive when searching
The person that added krunner search integration uses vim. It seemed
intuitive to that person that the Escape key should quit the search mode
instead of quitting the effect. But it seems like more intuitive thing
is to actually stop the effect.

BUG: 445708
3 years ago
Vlad Zahorodnii 17dbdf89bd effects/overview: Prevent WindowHeap accepting mouse events while searching
If the opacity property is set to 0, the item will still receive mouse
events. One either needs to set the enabled or the visible property to
false to ensure that the WindowHeap receives no mouse events.

The reason for setting the opacity to 0 instead of the visible property
to false was that I thought later will nuke the paint node, but it seems
like that's not the case.

BUG: 445707
3 years ago
Vlad Zahorodnii 35c6a3c0a1 effects/overview: Set Qt.ClosedHandCursor cursor shape during dnd
Many apps change the cursor shape during active dnd, do the same here
for the consistency sake.
3 years ago
David Edmundson 38348a006b [backends/x11] Fix typo causing crash 3 years ago
Vlad Zahorodnii 35b9950eb9 effects/overview: Implement internal implicit grab logic
This is needed to ensure that mouse release events go to the view that
received mouse press events; otherwise some views can get stuck in a
state thinking that button xyz is pressed.
3 years ago
Vlad Zahorodnii caa62fa736 effects/overview: Sync cursor set by QtQuick
Currently, cursor shape set by QtQuick is not sync'ed, which can be seen
as the pointer not changing its shape to i-beam when hovering the search
field.
3 years ago
Vlad Zahorodnii 379ae2d5c2 effects/overview: Reuse qml loading results between effect activations
Currently, every time you launch the overview effect, QtQuick will go
out and parse QML files. With the overview effect gaining more features
and the code size getting bigger, it takes more time for the overview to
present the first frame after it got triggered.

With this change, the overview effect will keep the ScreenView
QQmlComponent object around that can be used to avoid reparsing qml code
every time the overview effect is launched.

It also ports the Overview effect from de-facto deprecated qml context
to initial properties, which yield slightly better startup times.

BUG: 445666
3 years ago
Vlad Zahorodnii 20aeff20ea Fix build
idOffset is a static const variable, it doesn't need to be captured.
3 years ago
Arjen Hiemstra 310ef5e1c2 Add support for touch events to Overview effect
Implement touchUp/touchMotion/touchDown and forward them to the
EffectQuickView.
3 years ago
Arjen Hiemstra 626e4bc7e6 Add support for forwarding touch events to EffectQuickView
This allows effects to support touch input.

Unfortunately, Qt's TouchEvents require the full touch point state,
whereas KWin's internal touch handling only deals with one point at a
time. So we need to keep track of the touch state in EffectQuickView and
pass that on to Qt. Additionally, we need a QTouchDevice as lots of Qt
code depends on it.
3 years ago
David Edmundson 044767e296 Speed up EffectQuickView teardown
On my Nvidia machine there was a massive lag exitingthe overview effect.
Hotspot showed it as being in QOpenGLVertexArrayObjectPrivate::destroy.
In this method we clean up some shared objects used in the context when
the context closes.

In order to do this we need the context to be current. If it is not
current Qt currently internally creates a temporary offscreen surface.

To fix this we need to have our context current during destruction,
which includes changing order so it is destroyed before the surface.
3 years ago
Vlad Zahorodnii 030cc2d844 effects/overview: Add basic keyboard navigation support in DesktopBar
With this change, user will be able to press Tab and use Enter, Delete,
and F2 keys to activate, remove, and rename virtual desktops, respectively.

Co-authored: Fushan Wen <qydwhotmail@gmail.com>
3 years ago
Aleix Pol afd525ced0 Improve our reaction when primary changes
Ensure we sanitise the input so a client can't randomly crash KWin that
way.
3 years ago
Vlad Zahorodnii 039b1d031e wayland: Enable window rules for all xdg-toplevel
If a window wants to be initially shown in fullscreen mode, it will
issue an xdg_toplevel.set_fullscreen request before the first surface
commit.

If a window wants to be shown in fullscreen mode and there hasn't been
any first surface commit, kwin will cache the request and apply
fullscreen mode when checking window rules in the initialize() function.

On the other hand, window rules are disabled for plasma surfaces. The
motivation behind that was to forbid user from messing with plasma's
surfaces (this change was suggested during redesign of xdg-shell
implementation).

As it turns out, there are cases where plasma may ask to show a window
in fullscreen mode, which also has a plasma surface installed, e.g.
fullscreen application dashboard.

In order to fix the dashboard, this change allows window rules to be
applied to xdg-toplevel windows that also have plasma surfaces installed.

As is, xdg-toplevel surfaces and plasma surfaces are very different in
nature. Adding more quirks to handle plasma surfaces in
XdgToplevelClient is not worth the effort and there are better
alternatives, e.g. layer-shell.
3 years ago
Vlad Zahorodnii 262cb23dd9 effects/overview: Use PlasmaCore.ColorScope.backgroundColor in DesktopBar with light desktop themes 3 years ago
Vlad Zahorodnii c167ef5208 effects/overview: Remove window caption drop shadow effect 3 years ago
Vlad Zahorodnii 555a8018fc effects/overview: Make text in desktop bar have the same color as in search results 3 years ago
Vlad Zahorodnii 4f04da4e7a effects/overview: Bump underlay opacity to 0.75
This improves contrast when searching using Milou.
3 years ago
Vlad Zahorodnii 195de46c91 effects/overview: Use Milou for search results
Based on user feedback, it will be great to have krunner functionality
integrated in the overview/present windows effect.

This change ports the overview effect to Milou for search results. With
it, one can search for existing windows or launch new applications.

BUG: 445207
3 years ago
Aleix Pol a5899c2cbb screencast: Do not report a cursor geometry before we have a cursor texture
Otherwise we just crash as we don't know the size yet.
3 years ago
Aleix Pol 19df0996f5 scene: Do not clamp 1x1 windows
Without the margins, they become 0x0 and we crash.
3 years ago
Vlad Zahorodnii e21a3c7955 effects: Add support for cross-compiling support
kwin-strip-effect-metadata needs to run on the host. First, one needs to
build it, e.g.

    cmake --build build-native --target kwin-strip-effect-metadata

then when cross-compiling, point cmake to the native build directory, e.g.

    cmake -DKWIN_HOST_TOOLING=${path}/build-native
3 years ago
Vlad Zahorodnii a6090e7f83 effects: Strip unused builtin effect metadata
This improves plugin loading times. As is, the main issue is the number
of builtin effects and the fact that each has a lot of translated
strings, which combined adds up to noticeable loading times. KWin itself
will never read those translated strings, it only needs two pieces - the
plugin id and whether the plugin is enabled by default.

This change adds a little helper to strip unnecessary info from metadata
files.
3 years ago
Vlad Zahorodnii 068d60e36a Revert "wayland: Check workspace position when preferred deco mode changes"
This reverts commit 2560288e4b.

It broke alacricitty. The fix is not obvious, so revert the commit for
the time being.

BUG: 445444
3 years ago
Xaver Hugl 8528bbf800 backends/drm: ignore placholder outputs for the output config
They can only introduce intermediary state when a real output gets enabled
and are not relevant to the actual output config
3 years ago
Xaver Hugl b6b0af727d backends/drm: don't take crtcs from dpms disabled outputs
Fixes a crash I have with dpms + suspend, which was caused by the udev
event for updating outputs being called before the output got enabled
again. When DrmGpu::updateOutputs got called it removed the crtc from
the inactive output and then disabled the output afterwards. Instead,
only remove crtcs if an output is really disabled.
This also allows to generalize the logic for lease outputs, and could
in the future allow for faster dpms on/off switching.
3 years ago
Xaver Hugl 47d5d50bdf backends/drm: don't assume we have a cursor plane
CCBUG: 445507
3 years ago