Bug 368495

Summary: Window highlight of minimized windows creates clipping with windows's shadow
Product: [Plasma] kwin Reporter: Alexandre Pereira <pereira.alex>
Component: effects-variousAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal Flags: mgraesslin: ReviewRequest+
Priority: NOR    
Version First Reported In: 5.7.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
URL: https://phabricator.kde.org/D2748
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Alexandre Pereira 2016-09-09 13:33:29 UTC
Hi,

When using the window highlight of minimized windows, it hides the window but leaves the borders shadow.

See image for example: https://github.com/psifidotos/nowdock-plasmoid/issues/28

In this case, both konsole and dolphin are minimized. Using the plasma ( in this case a plasmoid nowdock ) funtionality of window highlight, it highlights the minimized windows, but when cycling through windows, it leaves their border's shadow.

Thanks !

Reproducible: Always
Comment 1 Alexandre Pereira 2016-09-09 13:35:24 UTC
Sorry, in the description, the image URL is : http://imgur.com/a/CX6wM

https://github.com/psifidotos/nowdock-plasmoid/issues/28 is the url where I reported it to nowdock

Thanks
Comment 2 Martin Flöser 2016-09-09 15:03:39 UTC
Looks like an incorrect repaint in highlight windows. Should be fairly simple to fix.
Comment 3 Martin Flöser 2016-09-12 08:26:08 UTC
Interesting with "normal" task bar I am not able to reproduce the issue.
Comment 4 Martin Flöser 2016-09-12 08:28:41 UTC
and NowDock I cannot test because it fails with Plasma 5.8 (no screen property)
Comment 5 Martin Flöser 2016-09-12 08:32:39 UTC
urgh I found the problem:
effects->addRepaint(w->geometry().adjusted(-16,-16,16,32)); // add some padding. w->addRepaintFull() is wrong for at least isInitiallyHidden ...

With a large shadow that's just going to break, changing decoration to reproduce.
Comment 6 Martin Flöser 2016-09-12 08:37:25 UTC
So far I didn't find any window decoration which breaks. Could you please tell me which decoration you used in that screenshot?
Comment 7 Alexandre Pereira 2016-09-12 08:42:59 UTC
Its breeze decoration but with shadow size of 65px and strength 75%.

I am able to use nowdock in master when i comment that line in main.qml:

--- a/contents/ui/main.qml
+++ b/contents/ui/main.qml
@@ -168,7 +168,7 @@ Item {
         id: tasksModel
 
         virtualDesktop: virtualDesktopInfo.currentDesktop
-        screen: plasmoid.screen
+        // screen: plasmoid.screen
         activity: activityInfo.currentActivity
 
         filterByVirtualDesktop: plasmoid.configuration.showOnlyCurrentDesktop
Comment 8 Alexandre Pereira 2016-09-12 08:45:05 UTC
Tested with normal taskmanager: it also breaks on master, if on panel. If its a single plasmoid on the desktop, it doesn't break.
Comment 9 Alexandre Pereira 2016-09-12 08:47:10 UTC
its shadow size of 64px, sorry. uploading video to show
Comment 10 Alexandre Pereira 2016-09-12 08:49:10 UTC
See video: https://youtu.be/moSbI5KsVM0
Comment 11 Martin Flöser 2016-09-12 08:50:29 UTC
(In reply to Alexandre Pereira from comment #9)
> its shadow size of 64px, sorry

Thanks, with these settings I'm able to reproduce
Comment 12 Martin Flöser 2016-09-12 09:16:21 UTC
Fix at: https://phabricator.kde.org/D2748
Comment 13 Alexandre Pereira 2016-09-12 09:18:13 UTC
Thanks !
Comment 14 Martin Flöser 2016-09-14 09:02:51 UTC
Git commit d910217bb97402b9fd3bf29ff5753fc3579cd38b by Martin Gräßlin.
Committed on 14/09/2016 at 08:44.
Pushed by graesslin into branch 'master'.

[effects] Repaint expandedGeometry in HighlightWindowsEffect

Summary:
The highlight windows effect tried to trigger repaints with the shadow
included by having an hardcoded pixel offset. This of course breaks if
the shadow is larger than the hardcoded value.

The reason presented on why it was done like that is no longer true and
in the effects the actual visible area including decorations and shadows
is available through the expandedGeometry.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

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

M  +2    -2    effects/highlightwindow/highlightwindow.cpp

http://commits.kde.org/kwin/d910217bb97402b9fd3bf29ff5753fc3579cd38b