Commit graph

64 commits

Author SHA1 Message Date
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
Vlad Zahorodnii
62500acd1a effects/fullscreen: Rewrite the effect using ES6 features
This is to keep the fullscreen effect in sync with the maximize effect.
2021-05-05 06:08:42 +00:00
Vlad Zahorodnii
3af5e9c8c4 effects/screenshot: Fix a typo
grabPointerImage() needs the coordinates of the top left corner of the
screen, not its size.
2021-05-03 20:54:09 +03:00
l10n daemon script
31cdb8676d 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-03 01:21:56 +00:00
Vlad Zahorodnii
a503efad45 Fix a typo
There is no matching opening parenthesis but the effect still works for
some reason.
2021-05-02 14:42:48 +03:00
Vlad Zahorodnii
411443bc05 effects/fade: Add a note reminding to remove FadeWindows option 2021-05-02 11:10:19 +00:00
Vlad Zahorodnii
24a474cb6c effects/fade: Rewrite the effect using ES6 features
This cleans up the code of the effect.
2021-05-02 11:10:19 +00:00
Vlad Zahorodnii
9fb58479b7 effects/scale: Rewrite the effect using ES6 features
Since the scripted effects were ported to QJSEngine, it's possible now to
use ECMAScript 2015 perks such as classes, let and const.

This change ports the scale effect to some ES6 features to make the code
neater.
2021-05-02 11:09:27 +00:00
Vlad Zahorodnii
db020c5614 effects/maximize: Rewrite the effect using ES6 features
Since the scripted effects were ported to QJSEngine, it's possible now to
use ECMAScript 2015 perks such as classes, let and const.
2021-05-02 11:08:13 +00:00
Felipe Kinoshita
a2ed8cb9da
[effects/presentwindows] add a comment explaining why we are darkening the panel 2021-04-29 01:14:56 -03:00
Felipe Kinoshita
64c721579d
[effects/presentwindows] Darken panel 2021-04-25 17:45:49 -03:00
Tomasz Paweł Gajc
e9fcd9584e effects: add support Panfrost Mali driver 2021-04-24 16:04:44 +02:00
Nate Graham
b2ae5378c7 [effects/windowaperture] Hide windows in corners
Reducing the oppacity of these windows causes them to appear as phantoms
in the corners of the screen. They look quite odd on top of anything else
in the corners of the screen, such as any Plasma panels.

However making them 100% opaque doesn;t work either, since then they
look interactive, but they're not, and can't be made so due to the
scripting API used here.

So our only real option to remove the weirdness is to make them 100%
transparent, and therefore show the entirety of the desktop with no sign
that the effect is in use.
2021-04-23 13:23:48 +00:00
l10n daemon script
6276c8882e 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-04-23 01:18:39 +00:00
Felipe Kinoshita
1a9b525970 [effects/presentwindows] Display window icons centered
Displaying them centered makes it a bit more visually appealing and
makes it easier to find which window belongs to what application
2021-04-21 15:10:05 +00:00
Felipe Kinoshita
16ae008104 [effects/presentwindows] change filterFrame position and text
Move filterFrame to the top of the screen and change it's text,
removing the "Filter: ".
2021-04-20 19:32:04 +00:00
Vlad Zahorodnii
5839e59e24 effects: Properly reset present times in coverswitch and flipswitch effects
The last presentation timestamps should be reset when all animations
finish rather than when the effect finishes. Otherwise, the calculated
time diff for the first animation frame will be too big.

BUG: 433471
2021-04-19 17:03:36 +00:00
Felipe Kinoshita
ff3cb59967 [effects/presentwindows] Show Panels by default
Showing the panels makes this effect a little bit more integrated
with the desktop. With the panels disabled it creates a separate state,
with the panels enabled it creates a more friendly state with
the effect adding to the already existing experience.
2021-04-19 15:17:32 +00:00
Vlad Zahorodnii
675d5c4216 effects: Remove outdated ksplash window class strings
ksplash nowadays has only "ksplashqml ksplashqml" window class.
2021-04-19 10:42:58 +03:00
David Redondo
1419993b89 Add a DBus interface to the presentWindows effect
The same as for the highlightWindows effect. Toggling it through
DBus is platform independent.
2021-04-08 09:09:00 +00:00
David Redondo
26bf4f51d0 Add a DBus interface to the highlightWindows effect
The Taskmanager can now activate it this way, instead of using X
atoms. This means it will also work on Wayland.
2021-04-08 09:09:00 +00:00