Commit graph

84 commits

Author SHA1 Message Date
Vlad Zahorodnii
fc52531f44 effects/overview: Make the window heap cover the maximize area
Currently, window thumbnails may be placed behind the panel, which
doesn't look good.

With this, the window heap will cover the same area as the maximize
area.
2021-08-19 16:35:28 +00:00
Vlad Zahorodnii
66d74f4398 effects/overview: Use Kirigami.ScenePosition
This makes the WindowHeap more robust to layout changes. Currently, the
main issue with it is that thumbnails will be misplaced if the heap's
scene position changes.

Kirigami.ScenePosition automagically keeps track of the item's scene pos.
2021-08-19 14:27:19 +00:00
Vlad Zahorodnii
4f66cd4c78 effects/overview: Make expo layout spacing configurable
This allows setting "hidpi-aware" spacing on X11.
2021-08-19 06:30:55 +00:00
Vlad Zahorodnii
6132329c2c Add Overview effect
This effect is meant to be as a replacement for the present windows and
the desktop grid effect. It is written using QML.

So far, this effect implements only the basic features of the present
windows effect. Desktop management features will be added later.

CCBUG: 295775
CCBUG: 303438
2021-08-19 06:30:55 +00:00
Vlad Zahorodnii
4af9674f17 Revert "screenshot: Reuse GLTexture::toImage"
This reverts commit ac16bef409.

It causes crashes and color channels seem to be swapped.

GLTexture::toImage() needs more work before it can be used in the
screenshot effect, or maybe dropped.
2021-08-16 12:28:40 +03:00
Méven Car
c5907e8f36 Fix a few compile warnings 2021-08-13 20:56:45 +02:00
Aleix Pol
ac16bef409 screenshot: Reuse GLTexture::toImage
Cleans the code a bit. It also makes use of the more performant
Qt::Format_RGBA8888_Premultiplied, which is nice to come by.
2021-08-12 16:00:52 +00:00
l10n daemon script
7db6ea0c15 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"
2021-08-04 01:15:43 +00:00
l10n daemon script
cf9c60a0c0 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"
2021-08-02 01:12:21 +00:00
Aleix Pol
475993db70 kscreen effect: Work per screen
Makes it possible to apply the dpms settings per screen instead of
applying it to all of them, which is wrong at many levels.
Will be even more important with other effects like rotation.
2021-07-28 10:57:27 +00:00
l10n daemon script
5317ca9da0 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"
2021-07-27 01:25:25 +00:00
l10n daemon script
068c1d4970 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"
2021-07-22 01:15:50 +00:00
Aleix Pol
eb62dbb9c5 Allow the KScreenEffect to work on Wayland
Makes it possible for wayland systems to show a dimming effect when a
display dpms is off.
2021-07-09 12:39:42 +02:00
l10n daemon script
f53cf9d71e 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"
2021-06-30 01:21:12 +00:00
Vlad Zahorodnii
10769548db kwineffects: Allow creating GLTexture without allocated storage
This allows creating a GLTexture object and attaching a dmabuf to it.
Currently, we can do that by using the foreign GLTexture constructor,
but it makes the deletion of the texture handle more error prone.

In the future, we can add a method that allocates the texture storage,
but there's no need for that yet.
2021-06-22 08:25:50 +00:00
Nate Graham
c9a719e109 [effects] Use standard arrow cursor in Present Windows & Desktop Grid
The pointing finger cursor is used to show that a piece of text is a
clickable link, and it is inappropriate to use it in other contexts.
Regular UI elements that do something when single-clicked continue to
use the standard arrow cursor in other contexts, so let's follow that
convention in the Present Windows and Desktop Grid effects too.

BUG: 421928
FIXED-IN: 5.23
2021-06-18 12:58:40 +00:00
Vlad Zahorodnii
29cc319455 kwineffects: Remove WindowQuadType
The window quad type has become irrelevant.
2021-06-14 07:56:02 +00:00
l10n daemon script
3ed363c498 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"
2021-06-14 01:16:13 +00:00
Vlad Zahorodnii
f280423b92 kwineffects: Remove PaintClipper
PaintClipper worked only with the XRender backend, which is gone now.
2021-06-10 15:58:33 +00:00
Aleix Pol
a24e92d0b7 blur: Use a custom projection matrix when passing to copy sample
The screen projection matrix doesn't necessarily apply to that
framebuffer, so we can't use it.
2021-06-10 10:06:35 +02:00
Vlad Zahorodnii
a06690021d Remove OpenGL2Compositing enum
OpenGLCompositing and OpenGL2Compositing enums mean de-facto the same
thing, it's confusing to have them both.
2021-06-09 15:24:22 +00:00
Vlad Zahorodnii
811beb94e0 Remove Xrender backend
The Xrender backend was added at the time when OpenGL drivers were not
particularly stable. Nowadays though, it's a totally different situation.

The OpenGL render backend has been the default one for many years. It's
quite stable, and it allows implementing many advanced features that
other render backends don't.

Many features are not tested with it during the development cycle; the
only time when it is noticed is when changes in other parts of kwin break
the build in the xrender backend. Effectively, the xrender backend is
unmaintained nowadays.

Given that the xrender backend is effectively unmaintained and our focus
being shifted towards wayland, this change drops the xrender backend in
favor of the opengl backend.

Besides being de-facto unmaintained, another issue is that QtQuick does
not support and most likely will never support the Xrender API. This
poses a problem as we want thumbnail items to be natively integrated in
the qtquick scene graph.
2021-06-09 11:21:57 +03:00
Vlad Zahorodnii
3c2ca184e3 effects: Remove Desktop Cube Animation effect
With the ongoing scene redesign, it needs to be rewritten. However,
given that it is not used widely based on support information from
various bug reports and our available man power is sparse, the most
reasonable thing is to drop the effect, unfortunately.
2021-06-09 08:21:27 +00:00
Vlad Zahorodnii
47ef0b5a3c effects: Remove Desktop Cube effect
With the ongoing scene redesign, it needs to be rewritten. However,
given that it is not used widely based on support information from
various bug reports and our available man power is sparse, the most
reasonable thing is to drop the effect, unfortunately.
2021-06-09 08:21:27 +00:00
Vlad Zahorodnii
3722c21660 effects: Remove Cover Switch effect
With the ongoing scene redesign, it needs to be rewritten. However,
given that it is not used widely based on support information from
various bug reports and our available man power is sparse, the most
reasonable thing is to drop the effect, unfortunately.
2021-06-09 08:21:27 +00:00
Vlad Zahorodnii
bcff948e39 effects: Remove Flip Switch effect
With the ongoing scene redesign, it needs to be rewritten. However,
given that it is not used widely based on support information from
various bug reports and our available man power is sparse, the most
reasonable thing is to drop the effect, unfortunately.
2021-06-09 08:21:27 +00:00
Vlad Zahorodnii
1b2c7b248b Run clazy with qt-keywords fixit
In C++20, there will be emit() class member, which can conflict with the
emit keyword. Given that, there are plans to enable QT_NO_KEYWORDS by
default in the future.

See also
https://lists.qt-project.org/pipermail/development/2020-February/038812.html
2021-06-08 10:49:42 +03:00
Vlad Zahorodnii
605f00d03a effects/backgroundcontrast: Properly handle empty regions set by internal windows 2021-06-07 06:03:19 +00:00
Vlad Zahorodnii
cade5064c3 effects/blur: Properly handle empty blur regions set by internal windows
The task switcher has a valid empty blur region and the blur effect
misdetects that, which results in no blurred background.

BUG: 433131
2021-06-07 06:03:19 +00:00
Vlad Zahorodnii
de3b7a96db effects/blur: Ignore xshape region
EffectWindow::shape() doesn't fit the item based design. This change
ports the blur effect away from the shape() function to the rect()
function. The XShape extension was introduced when windows with an alpha
channel wasn't really a thing. Setting a shape served as a way to clip a
window, the most notable example is xeyes.

If an application relies on the xshape extension to actually clip the
window and not to force the window manager not to put the server-side
deco, it most likely doesn't support translucency and therefore it
shouldn't set the blur region to begin with.

This change makes the blur effect ignore the xshape region similar to
the background contrast effect. It allows us to decouple a bit more
effects from the rest of rendering machinery and thus make it easier for
us to move forward with the scene redesign goal.
2021-06-01 06:26:17 +00:00
Vlad Zahorodnii
8d378cd4cd effects/fallapart: Port to DeformEffect 2021-05-31 05:27:22 +00:00
Vlad Zahorodnii
61d3134aa5 effects/magiclamp: Port to DeformEffect 2021-05-31 05:27:22 +00:00
Vlad Zahorodnii
ab706e53dc effects/wobblywindows: Port to DeformEffect 2021-05-31 05:27:22 +00:00
Nicolas Fella
f910b0de97 Use version-less qt DBus macros
They work with both Qt5 and Qt6
2021-05-31 01:00:35 +02:00
Vlad Zahorodnii
eb27d312a3 effects/desktopgrid: Clip windows differently
Similar to the slide effect, the desktop grid can use the clip region to
clip windows when needed. This will improve performance because the desktop
grid effect will do less work. Currently, it clips quads on its own in
prePaintWindow, copies them over in a temporary list, and lets the opengl
scene clip the window quads again.

We can clip windows differently by just passing a custom region to the
paintWindow() function down the effects chain, which the desktop grid
effect already does.

The old behavior and the old bugs are preserved. The Xrender code path is
unaffected.
2021-05-28 16:48:17 +00:00
Vlad Zahorodnii
2b88fab8c1 effects/screenshot: Add support for HiDPI window screenshots
In general, on Wayland, there is no such a thing as "window scale factor"
because sub-surfaces can have different buffer scales. However, we know
the scale factor of the output where the window is considered to be on. So
we can use the screen's scale factor as the window's scale factor. In
most cases, it will produce the correct result.
2021-05-28 17:36:56 +03:00
Vlad Zahorodnii
a8d702ba30 effects/screenshot: Port away from window quads
For the scene redesign, window quads need to be removed from the effects
api. This change ports the screenshot effect away from quads.

In order to exclude the server-side decoration from the window
screenshot, the effect will render the contents of the client geometry
into the offscreen texture. If the window is client-side decorated, the
entire window will be rendered as before.

The good thing about this approach is that the screenshot effect will do
less work, it won't loop over window quads to compute the bounding rect
or filter out the deco quads.
2021-05-28 14:03:42 +03:00
Vlad Zahorodnii
fa66c3d238 Make Toplevel::isClient() return true for internal and wayland windows
It's needed to merge Toplevel and AbstractClient. Previously, we
couldn't do it because Toplevel::isClient() was somewhat widely used.
2021-05-25 19:06:17 +03:00
Aleix Pol
3c7290b722 Abstract startup semantics in the startupfeedback effect 2021-05-24 17:19:08 +02:00
l10n daemon script
13189463b0 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"
2021-05-18 01:24:15 +00:00
Nate Graham
b29f211fe4 Disable translucency effect by default
Many reasons have been brought up over the years for why this effect is
not appropriate to be enabled by default:
- It was designed to highlight the whizzy technical feature of being
  able to make windows transparent, which is no longer particularly
  impressive today.
- It looks visually dated.
- It can produce a confusing visual soup by blending a window being
  moved or resized with the content below it, which we recently disabled
  for the Highlight Windows effect.
- If one window is covering up another as a way to deliberately hide the
  content of the lower window, this effect will reveal the hidden
  content whenever the upper window is moved or resized at all.

Overall it does not seem to have enough advantages to offset these
issues. Let's disable it by default--but only for the people who did not
modify its configuration at all. We can assume that those people like
it, so let's keep it on for them.

BUG: 384054
FIXED-IN: 5.23

Closes Phab task T7915
2021-05-14 15:21:11 +00:00
Aleix Pol
c405877801 Only mark slots as slots 2021-05-14 01:35:33 +02:00
Aleix Pol
5b5ef7f07e Remove unused variables 2021-05-14 01:35:33 +02:00
Aleix Pol
035ea75ab7 Use qAsConst in fors when there's a risk for it to detach 2021-05-14 01:35:33 +02:00
Aleix Pol
50dd08531e Make sure we do not get references on temporary objects 2021-05-14 01:35:33 +02:00
Aleix Pol
84200e7e38 EffectWindow::geometry -> EffectWindow::frameGeometry
::geometry is deprecated.
2021-05-14 01:35:33 +02:00
Vlad Zahorodnii
7475385c82 Make scale and glide effect ignore lockscreen greeter
On X11, the lockscreen greeter is an override-redirect window so the
scale and the glide effect ignore it.

On Wayland, the lockscreen greeter is a regular window so both effects
try to animate it upon the screen being unlocked, which looks bad.
2021-05-13 05:46:30 +00:00
Vlad Zahorodnii
9b2b450fdd wayland: Use new api to remove globals safely
BUG: 435258
2021-05-12 11:31:36 +00:00
Vlad Zahorodnii
1e6c5a7420 effects/squash: Use cubic easing curve
According to the HIG, the InCubic easing curve should be used if the
animated item changes its state from visible to invisible and the
OutCubic easing curve if vice versa.
2021-05-11 19:25:31 +00:00
Aleix Pol
c544d4f297 slide effect: remove redundant code 2021-05-08 00:37:52 +00:00