Bug 361516

Summary: Panel on top/left cause a black window in cube animation
Product: [Plasma] plasmashell Reporter: farseerfc
Component: PanelAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: amtopie, bob, bugseforuns, costas.magnuse, danillo.alvarenga, lukasr93, maldela, notuxius, pa_collins, skpl1137, tiposchi, yuking_net, zhaixiang, zh_jq
Priority: NOR    
Version: 5.6.2   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
URL: https://img.vim-cn.com/7e/641e2c7c1029938a70986843c8e00488610db8.ogv
Latest Commit: Version Fixed In: 5.15.0

Description farseerfc 2016-04-08 08:13:40 UTC
I reported this behavior first on the kwin side: https://bugs.kde.org/show_bug.cgi?id=361511
During the investigation I suspect that the problem is on plasma's side.

I re-made a new screen record to illustrate this behavior:
https://img.vim-cn.com/7e/641e2c7c1029938a70986843c8e00488610db8.ogv

As we can see from the record, if I put a panel on the top or left side of the screen, and active cube animation by switching virtual desktop, there is a black window on the top right corner of the screen that is approximately 1/4 size of the screen.

By applying the cube animation to all the windows including the panels, the problem is gone.

Following the suggestions in the above kwin's bug report, I tried to locate the suspicious window.
This is the output of `xwininfo -root -tree`: http://cfp.vim-cn.com/ccyQ
We can see there is a window with size  640x480
 0x1e00039 "Plasma": ("plasmashell" "plasmashell")  640x480+0+0  +0+0

I am not quite sure but I found this window on all my setups that have this behavior.

And this is the `xwininfo -id 0x1e00039`: http://cfp.vim-cn.com/ccyR
This is the `xprop -id 0x1e00039`: http://cfp.vim-cn.com/ccyS



Reproducible: Always

Steps to Reproduce:
1. Select "Cube" Animation in system settings for switching virtual desktops
2. put the panel on the top side or left side of the screen
3. active cube animation by switching virtual desktop

Actual Results:  
A black window is appearing on the top right corner of the screen during the animation.

Expected Results:  
Normal animation.
Comment 1 farseerfc 2016-04-12 12:07:12 UTC
I forget to kill other irrelevant apps before getting the output.
Here is the new output by leaving only plasma and konsole and kwin on screen:
`xwininfo -root -tree`: http://cfp.vim-cn.com/cczz
`xprop -id 0x2000030`: http://cfp.vim-cn.com/ccz0
`xwininfo -id 0x2000030`: http://cfp.vim-cn.com/ccz0

And another detail, I tried this on 3 of my laptops, with different screen size.
1366x768, 1600x900, 2560x1600 . The black windows all "seems" taking 1/4 of the screen,
and there is always a window with 640x480 geometry in the `xwininfo -root -tree`
Comment 2 Thomas Lübking 2016-06-18 16:52:33 UTC
*** Bug 364465 has been marked as a duplicate of this bug. ***
Comment 3 Yuking 2016-07-18 12:33:39 UTC
I reproducted this bug on three different platforms. One is lfs compiled from git, the other two are Arch running with different hardwares.
Comment 4 Leslie Zhai 2016-10-12 07:38:44 UTC
> Killing plasmashell makes the problem go away

Salvo "LtWorf" Tomaselli described in KDEBUG-364465 is wrong! kill plasmashell, then there is *NO* container for desktop folderview (or desktopview) nor panel, so press CTRL+F1...F4 will see *empty* black rectangle.

It is able to remove the (top) panel, then press CTRL+F1 shortcut, there is *NO* a black or rectangle any more! so perhaps it might be plasma-desktop/containments/panel issue.
Comment 5 Łukasz 2016-10-27 08:22:28 UTC
Exactly the same problem on Kubuntu 16.10 and Mint 18 on Intel HD 3000 mobile in laptop. Other distributions and machines aren't tested.
Comment 6 Łukasz 2016-10-27 08:30:15 UTC
half-workaround: uncheck "Do not animate panels"
Comment 7 Łukasz 2016-12-17 21:49:50 UTC
Mint 18, Plasma updated to version 5.8.4 and bug still exists. But most noticed bugs from Plasma 5.6.4 disappeared :-)
Comment 8 pa_collins 2016-12-20 14:44:08 UTC
To add my own observation (and maybe imply a workaround) if the panel at the top or left of the screen is even a tiny bit less than maximum width, then the graphical anomaly is not provoked!
Comment 9 Łukasz 2017-01-10 12:55:15 UTC
@pa_collins@msn.com max width panel? It uses half the screen for me when panel on left side...
Comment 10 Łukasz 2017-01-10 13:03:24 UTC
ok, I understand you - width = height for panel on left side, but not working for me.
Comment 11 farseerfc 2017-01-10 13:16:00 UTC
The workaround of "width < height" only works for me when the panel is aligned at the middle or bottom for a vertical panel, or right/middle for a horizontal one. i.e. the black window will appear if and only the left top corner is occupied by the panel. Leaving a single pixel for the background will dismiss the black window.
Comment 12 Łukasz 2017-01-10 13:19:17 UTC
(In reply to farseerfc from comment #11)
> The workaround of "width < height" only works for me when the panel is
> aligned at the middle or bottom for a vertical panel, or right/middle for a
> horizontal one. i.e. the black window will appear if and only the left top
> corner is occupied by the panel. Leaving a single pixel for the background
> will dismiss the black window.

That's it. For me too.
Comment 13 Constantine Tsardounis 2017-05-17 22:08:56 UTC
(In reply to Łukasz from comment #6)
> half-workaround: uncheck "Do not animate panels"

I confirm the back and the half-workaround. Thanks!

The "Do not animate panels" is located in System Settings (Workspace) > Desktop Behavior > Desktop Effects > options of Desktop Cube Animation.
Comment 14 Danillo 2017-05-27 23:12:23 UTC
I'm also facing this bug on version 5.8.6-1 in Debian 9. I'm using a Dell Inspiron laptop with a left-side vertical panel, and I've noticed that plugging an external display to the right stops the black window from appearing in the laptop, but causes the whole upper half of the external monitor to black out. However, this issue is gone if I change the external display to the left in system settings. The animated panel workaround can also fix this.
Comment 15 Igor Poboiko 2018-01-13 16:40:25 UTC
*** Bug 374854 has been marked as a duplicate of this bug. ***
Comment 16 Igor Poboiko 2018-01-13 16:40:49 UTC
*** Bug 368144 has been marked as a duplicate of this bug. ***
Comment 17 Alexander Mentyu 2018-03-01 14:01:10 UTC
Bug is reproducible with top and left top position of Panel

Plasma: 5.12.2
Apps: 17.12.2
Frameworks: 5.43.0
Qt: 5.10.1
Kernel: 4.14.22-1-MANJARO
OS: Netrunner Rolling
Video: Intel 4400
xf86-video-intel 1:2.99.917+812+g75795523-1
Screen: 1600x900
Comment 18 Igor Poboiko 2018-09-14 09:39:22 UTC
Git commit ca1b5ea1070ccd23dd742f35d449e4a531ff7951 by Igor Poboiko.
Committed on 14/09/2018 at 09:36.
Pushed by poboiko into branch 'master'.

[effects/cubeslide] Fix visual glitches with Blur / BackgroundContrast effect

Summary:
Bugs occurred because KWin was not very happy when windows were painted during CubeSlideEffect::paintScreen().
Another issue is that blur, although it was supposed to, did not work at all (haven't found appropriate bug on bugzilla).
As well as background contrast effect.

This patch does the following thing:

 - Adopted WindowForceBlur / WindowForceBackgroundContrast logic from SlideEffect, instead of panels/stickyWindows QSets (those become useless anyway)
 - Added shouldAnimate code, which determines whether a window should be animated with the cube (i.e. ordinary windows) or should stick (i.e. panels or pinned windows, if corresponding options are checked in the settings)
 - It paints an additional non-transformed screen, on which it paints only "sticky" windows. This is done because otherwise KWin would apply blur not behind the OSD, but on the same place on moving cube face.
 - (in addition) switched to new Qt5 connect syntax.

Reviewers: #kwin, zzag

Differential Revision: https://phabricator.kde.org/D15175
Related: bug 362360
FIXED-IN: 5.15.0

M  +87   -54   effects/cube/cubeslide.cpp
M  +10   -3    effects/cube/cubeslide.h

https://commits.kde.org/kwin/ca1b5ea1070ccd23dd742f35d449e4a531ff7951