Bug 416048 - Morphing Popups effect: glitch when the size of a tooltip is reduced
Summary: Morphing Popups effect: glitch when the size of a tooltip is reduced
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-various (show other bugs)
Version: git master
Platform: Arch Linux Linux
: HI normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 403321 427127 427193 432255 433792 437789 439120 443753 443938 444819 445080 446327 448312 448561 448950 453834 461632 470463 471360 477998 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-01-09 13:54 UTC by Patrick Silva
Modified: 2024-03-23 19:04 UTC (History)
32 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
screen recording (2.23 MB, video/webm)
2020-01-09 13:54 UTC, Patrick Silva
Details
Seen with Task Manager tooltips (1.87 MB, video/webm)
2020-07-15 02:28 UTC, Nate Graham
Details
Flickering tooltips with lattedock (232.28 KB, video/webm)
2021-09-04 11:37 UTC, Alex Dewar
Details
Tooltip flickering when resizing from a window preview and a smaller tooltip (385.70 KB, video/mp4)
2022-05-15 17:28 UTC, therealdragonofwar
Details
QT tootips corruption (635.65 KB, video/mp4)
2023-08-21 18:59 UTC, Guido
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2020-01-09 13:54:32 UTC
Created attachment 124999 [details]
screen recording

STEPS TO REPRODUCE
1. install Strawberry player and play any track with it
2. hover over Strawberry systray icon
3. while the tooltip of Strawberry is visible, hover over "Show hidden icons" button

OBSERVED RESULT
watch the attached screen recording please

EXPECTED RESULT
no glitch

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.65.0
Qt Version: 5.14.0
Comment 1 Konrad Materka 2020-01-16 12:45:45 UTC
It's not a bug, it's a feature :)
When tooltip changes, two things happens:
* content changes
* then size is animated
As a result, in some cases the effect is ugly if size difference is significant.

Any idea how it should behave?
Comment 2 Patrick Silva 2020-01-16 13:11:29 UTC
The effect looks laggy. It's not possible to improve it?
Comment 3 David Edmundson 2020-01-16 13:24:41 UTC
Maybe. If we get the resize and the contents atomically we should be able to blend in the contents. We do that for one of the other kwin resize effects.
Comment 4 David Edmundson 2020-01-16 13:34:16 UTC
Does someone want to test:

diff --git a/effects/morphingpopups/package/contents/code/morphingpopups.js b/effects/morphingpopups/package/contents/code/morphingpopups.js
index 838964f6e..f862af948 100644
--- a/effects/morphingpopups/package/contents/code/morphingpopups.js
+++ b/effects/morphingpopups/package/contents/code/morphingpopups.js
@@ -115,7 +115,7 @@ var morphingEffect = {
             couldRetarget = retarget(window.fadeAnimation[0], 1.0, morphingEffect.duration);
         }
 
-        if (!couldRetarget) {
+        if (true) {
             window.fadeAnimation = animate({
                 window: window,
                 duration: morphingEffect.duration,





you should be able to mod morphingpopups.js within your installation without needing to rebuild kwin
Comment 5 Patrick Silva 2020-01-16 15:15:42 UTC
David, I added your code to morphingpopups.js and ran "kwin_x11 --replace" but nothing changed.
Comment 6 Nate Graham 2020-07-15 02:27:20 UTC
Can reproduce with Task Manager tooltips too.
Comment 7 Nate Graham 2020-07-15 02:28:49 UTC
Created attachment 130134 [details]
Seen with Task Manager tooltips
Comment 8 Nate Graham 2020-07-15 02:30:48 UTC
Moving to KWin since it seems to be an issus with the Morphing Popups effect.
Comment 9 Nate Graham 2020-11-24 19:09:09 UTC
*** Bug 427193 has been marked as a duplicate of this bug. ***
Comment 10 Vlad Zahorodnii 2020-11-25 08:07:31 UTC
I don't think that we can (properly) fix this bug without changing the client side. Basically, plasmashell will have to perform a "live resize" (like on macOS) on tooltips.
Comment 11 Patrick Silva 2020-12-10 17:22:30 UTC
is bug 427127 a duplicate?
Comment 12 Nate Graham 2020-12-10 18:47:05 UTC
Pretty sure, yeah.

*** This bug has been marked as a duplicate of bug 427127 ***
Comment 13 Claudius Ellsel 2021-01-29 12:03:59 UTC
Since this bug is the older one and contains more information, I am reversing the duplicate direction.
Comment 14 Claudius Ellsel 2021-01-29 12:04:05 UTC
*** Bug 427127 has been marked as a duplicate of this bug. ***
Comment 15 Claudius Ellsel 2021-01-29 12:05:13 UTC
Just to confirm, this only happens on Wayland as on the duplicate, correct?
Comment 16 Claudius Ellsel 2021-01-29 12:06:18 UTC
*** Bug 432255 has been marked as a duplicate of this bug. ***
Comment 17 Claudius Ellsel 2021-01-29 12:10:22 UTC
Mh, looking at the videos here, the symptoms look different compared to https://bugs.kde.org/show_bug.cgi?id=427127 (and this here seems to also happen on X11). So I am not entirely sure whether that one is actually a duplicate of this.
Comment 18 Nate Graham 2021-03-02 16:33:18 UTC
*** Bug 433792 has been marked as a duplicate of this bug. ***
Comment 19 Nate Graham 2021-03-20 16:34:26 UTC
*** Bug 403321 has been marked as a duplicate of this bug. ***
Comment 20 Patrick Silva 2021-05-30 12:38:56 UTC
*** Bug 437789 has been marked as a duplicate of this bug. ***
Comment 21 Nate Graham 2021-07-29 16:35:00 UTC
*** Bug 439120 has been marked as a duplicate of this bug. ***
Comment 22 nyanpasu64 2021-07-29 23:25:07 UTC
I'm getting the same issue when moving the mouse across the taskbar. And worse yet, I can end up with remnants of glitched tooltips on-screen, not cleared when you move the mouse away (https://bugs.kde.org/attachment.cgi?id=140014, see 0:12).

I was also able to create a black graphical corruption on the left side of the screen that flickered when I moved my mouse across the icons on the right of the panel, but I was unable to record or reproduce that issue, and it disappeared before I could launch a screen recorder. I did manage to record a video of a corrupted tooltip icon, rendering in the wrong spot, scaled up from its original size, and flickering (https://www.youtube.com/watch?v=uicwjFR3du8).
Comment 23 Alex Dewar 2021-09-04 11:37:06 UTC
Created attachment 141286 [details]
Flickering tooltips with lattedock
Comment 24 Alex Dewar 2021-09-04 11:37:43 UTC
I've witnessed this bug in a more gross form with lattedock tooltips (see attachment).
Comment 25 Patrick Silva 2021-10-15 02:14:34 UTC
*** Bug 443753 has been marked as a duplicate of this bug. ***
Comment 26 Nate Graham 2021-10-18 17:29:16 UTC
*** Bug 443938 has been marked as a duplicate of this bug. ***
Comment 27 Nate Graham 2021-11-08 17:50:10 UTC
*** Bug 444819 has been marked as a duplicate of this bug. ***
Comment 28 Nate Graham 2021-11-08 21:13:29 UTC
*** Bug 445080 has been marked as a duplicate of this bug. ***
Comment 29 Marco Martin 2021-11-12 12:01:02 UTC
what happens in this bug is that whe window contents are replaced immediately rather than cross faded like the maximize effect (ar what this effect used to do)
Comment 30 Marco Martin 2021-11-12 12:17:40 UTC
Here not only morphingpopup shows this, but also maximize and fullscreen show the same glitch (very noticeable if one sets animations to be super slow) so seems crossfading got completely broken on kwin effects
Comment 31 Marco Martin 2021-11-12 12:19:13 UTC
Cross fading support was recently removed as part of the scene redesign work, will eventually get back reimplemented properly
Comment 32 Nate Graham 2021-11-17 18:03:44 UTC
Bug 305247 was just fixed yesterday in git master and now I can no longer reproduce the issue here. Can anyone running git master everything check as well?
Comment 33 Patrick Silva 2021-11-17 18:48:21 UTC
it's still reproducible on neon unstable.
Comment 34 Nate Graham 2021-11-17 18:54:09 UTC
OK.
Comment 35 Nate Graham 2021-12-01 20:55:18 UTC
*** Bug 446327 has been marked as a duplicate of this bug. ***
Comment 36 Nate Graham 2022-01-21 01:09:10 UTC
*** Bug 448561 has been marked as a duplicate of this bug. ***
Comment 37 Patrick Silva 2022-01-22 16:03:21 UTC
*** Bug 448950 has been marked as a duplicate of this bug. ***
Comment 38 Nate Graham 2022-05-04 17:38:34 UTC
*** Bug 448312 has been marked as a duplicate of this bug. ***
Comment 39 Patrick Silva 2022-05-15 17:15:00 UTC
*** Bug 453834 has been marked as a duplicate of this bug. ***
Comment 40 therealdragonofwar 2022-05-15 17:28:40 UTC
Created attachment 148861 [details]
Tooltip flickering when resizing from a window preview and a smaller tooltip
Comment 41 Nate Graham 2022-11-09 20:07:20 UTC
*** Bug 461632 has been marked as a duplicate of this bug. ***
Comment 42 ratijas 2022-11-18 16:40:02 UTC
I found very related bug in other part of KDE: Kirigami and Plasma Icons. They are QML components, and they are supposed to cross-fade when changed. But due to the way they work, they assume before & after sizes are equal, so when transitioning between e.g. rectangular and square icons, the animation isn't smooth at all. Attempt to fix that uncovered another corner case: transitioning from the middle of an ongoing transition, which as turned out required manual blending with QPainter and stuff.

Different area, but very similar problem. Quite likely, they'll be both fixed in the same way.
Comment 43 Nate Graham 2023-06-05 05:18:05 UTC
*** Bug 470463 has been marked as a duplicate of this bug. ***
Comment 44 David Edmundson 2023-06-12 10:49:59 UTC
A good test is qtbase/examples/widgets/widgets/tooltips
Comment 45 Patrick Silva 2023-06-23 07:58:42 UTC
*** Bug 471360 has been marked as a duplicate of this bug. ***
Comment 46 Nate Graham 2023-08-21 18:52:32 UTC
*** Bug 473411 has been marked as a duplicate of this bug. ***
Comment 47 Guido 2023-08-21 18:57:58 UTC
(In reply to Nate Graham from comment #46)
> *** Bug 473411 has been marked as a duplicate of this bug. ***

Hi Nate, my bug is different. I have no problem with plasma things like panel, etc. only on QTwidgets.

I add my video here too.
Comment 48 Guido 2023-08-21 18:59:03 UTC
Created attachment 161096 [details]
QT tootips corruption
Comment 49 Guido 2023-08-22 16:42:01 UTC
I would like to try to exclude QTWidgets tooltips from the effect. Looking at the documentation here (https://techbase.kde.org/Development/Tutorials/KWin/Effects/JS_API) I understand that there is no property to distinguish. On the other hand looking at the fadindpopups effect I see that there is a window.popupWindow property that is not documented, so I would need to know if there is a property like window.QTWidgetTooltip or window.QMLTooltip that would allow to distinguish between tooltips types.
Comment 50 Patrick Silva 2023-12-04 04:18:02 UTC
*** Bug 477998 has been marked as a duplicate of this bug. ***
Comment 51 fanzhuyifan 2024-02-02 07:36:47 UTC
(In reply to David Edmundson from comment #4)
> Does someone want to test:
> 
> diff --git a/effects/morphingpopups/package/contents/code/morphingpopups.js
> b/effects/morphingpopups/package/contents/code/morphingpopups.js
> index 838964f6e..f862af948 100644
> --- a/effects/morphingpopups/package/contents/code/morphingpopups.js
> +++ b/effects/morphingpopups/package/contents/code/morphingpopups.js
> @@ -115,7 +115,7 @@ var morphingEffect = {
>              couldRetarget = retarget(window.fadeAnimation[0], 1.0,
> morphingEffect.duration);
>          }
>  
> -        if (!couldRetarget) {
> +        if (true) {
>              window.fadeAnimation = animate({
>                  window: window,
>                  duration: morphingEffect.duration,
> 
> 
> 
> 
> 
> you should be able to mod morphingpopups.js within your installation without
> needing to rebuild kwin

For me this fixes the issue somewhat -- without the patch morphing tooltips often end up in a broken state, with some of the content cut off; with the patch the tooltip always end up with the correct size, though the animations can be a bit glitchy.
Comment 52 Nate Graham 2024-02-05 20:25:37 UTC
I can reproduce that that patch makes a big difference. Since we know there are client-side bugs here, maybe that or that plus a little something extra might be enough to call this fixed from a KWin perspective.
Comment 53 Guido 2024-02-05 20:33:59 UTC
The patch doesn't solve the problem with QTWidget Tooltips
Comment 54 Nate Graham 2024-02-05 20:37:55 UTC
Right, because the bug isn't about QtWidgets tooltips. The Morphing Popups effect doesn't apply to them.
Comment 55 Guido 2024-02-05 20:40:34 UTC
(In reply to Nate Graham from comment #54)
> Right, because the bug isn't about QtWidgets tooltips. 

I am writing here because the bug I had opened was closed because it was considered a duplicate of this one.

> The Morphing Popups
> effect doesn't apply to them.

Are you sure? When I enable the effect the problem with QTWidgets occurs, when it is disabled it does not.
Comment 56 Nate Graham 2024-02-06 16:07:15 UTC
Hmm, well I was, but now I'm not anymore!