Bug 399490 - Tooltips of the buttons in the window decoration fail under Wayland
Summary: Tooltips of the buttons in the window decoration fail under Wayland
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.13.90
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Vlad Zahorodnii
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-07 16:44 UTC by Patrick Silva
Modified: 2018-12-05 18:05 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.15.0
Sentry Crash Report:
mgraesslin: Wayland+
mgraesslin: X11-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2018-10-07 16:44:36 UTC
OBSERVED RESULT
Sometimes the tooltip is blank. Watch the screencast please.
https://www.youtube.com/watch?v=HHfQ2sjKn7c

EXPECTED RESULT
The tooltip should always be shown correctly.

SOFTWARE VERSIONS
Arch Linux
KDE Plasma Version: 5.14 beta
KDE Frameworks Version: 5.50
Qt Version: Qt 5.11.2
Comment 1 Martin Flöser 2018-10-07 19:05:20 UTC
Seeing this as well after the upgrade to Neon based on 18.04
Comment 2 David Edmundson 2018-11-14 11:26:09 UTC
I had a little while looking at this. 

Some observations:
 - the buffer sent on the QPA side is fine
 - running KWIN_COMPOSE=Q doesn't show this issues.
Comment 3 Vlad Zahorodnii 2018-11-27 14:51:04 UTC
Yikes, it looks like I introduced this bug:

git bisect start
# bad: [4dc49d496c255a0aa123330987ebd68fe2305fab] [kconf_update] Use scripted dim screen effect
git bisect bad 4dc49d496c255a0aa123330987ebd68fe2305fab
# good: [7062d4ba58964bfddd2e2a3b3458e2dc66605482] SVN_SILENT made messages (.desktop file) - always resolve ours
git bisect good 7062d4ba58964bfddd2e2a3b3458e2dc66605482
# good: [d6bce8d79eeadf894983c1d169a700261b761109] Merge branch 'Plasma/5.12' into Plasma/5.13
git bisect good d6bce8d79eeadf894983c1d169a700261b761109
# bad: [e822d27cbecf0e8f89f0e79fc1e5da7d6a231a12] [effects/cube] Update cubecap texture
git bisect bad e822d27cbecf0e8f89f0e79fc1e5da7d6a231a12
# good: [85eec90c233ad5e98b82cc6f24142a64e421d68f] SVN_SILENT made messages (.desktop file) - always resolve ours
git bisect good 85eec90c233ad5e98b82cc6f24142a64e421d68f
# good: [16c63efdb76599287034a2441a399e87d50cb17e] SVN_SILENT made messages (.desktop file) - always resolve ours
git bisect good 16c63efdb76599287034a2441a399e87d50cb17e
# good: [e4ff50624a0e1f37149bb27e081ed58f58e268e9] SVN_SILENT made messages (.desktop file) - always resolve ours
git bisect good e4ff50624a0e1f37149bb27e081ed58f58e268e9
# bad: [ce7e79cdd696ca0bea987768b11b333041484e85] SVN_SILENT made messages (.desktop file) - always resolve ours
git bisect bad ce7e79cdd696ca0bea987768b11b333041484e85
# bad: [93b3ace067ae063df54db74ce8bc68f011280944] [effects/fadedesktop] Fade to the correct opacity
git bisect bad 93b3ace067ae063df54db74ce8bc68f011280944
# bad: [213239a0ea0a9c0967bb68d1eda7a8d4d6a09498] [shadow] Rebuild quads after creation of shadow
git bisect bad 213239a0ea0a9c0967bb68d1eda7a8d4d6a09498
# good: [0a2e51db47f4c91490626872375d61c8fec3aa73] Remove duplicated auto backend resolution
git bisect good 0a2e51db47f4c91490626872375d61c8fec3aa73
# first bad commit: [213239a0ea0a9c0967bb68d1eda7a8d4d6a09498] [shadow] Rebuild quads after creation of shadow

I'll upload the fix a little bit later.
Comment 4 Vlad Zahorodnii 2018-12-05 18:05:27 UTC
Git commit 90a26e2e8d133cf5b180ec18f3f6ff43bf8861f4 by Vlad Zagorodniy.
Committed on 05/12/2018 at 18:05.
Pushed by vladz into branch 'master'.

Try to invalidate quad cache when shadow is changed

Summary:
213239a0ea0a9c0967bb68d1eda7a8d4d6a09498 tried to address the case when
a wayland client gets shadow after it was mapped, but because of poor
testing from my side, another bug was introduced. If a decoration tooltip
or the user actions popup is shown, then in some cases it can be blank.

Usually, SurfaceInterface::shadowChanged proceeds SurfaceInterface::sizeChanged,
so when the shadow is installed, window quads cache is rebuilt. But
because shell client already knows the geometry of the internal client,
goemetryShapeChanged is not emitted, thus the cache is not updated.

It would be better just to invalidate the cache when the shadow is
installed, uninstalled, or updated. This reduces the number of
unnecessary invocations of Scene::Window::buildQuads and also moves
handling of the window quads cache away from the Shadow class.
FIXED-IN: 5.15.0

Test Plan: Decoration tooltips are no longer blank.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, graesslin, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17215

M  +11   -1    scene.cpp
M  +1    -0    scene.h
M  +16   -18   shadow.cpp
M  +6    -0    toplevel.h

https://commits.kde.org/kwin/90a26e2e8d133cf5b180ec18f3f6ff43bf8861f4