Bug 310613

Summary: Rendering of window decoration preview is broken/rendered white/partial
Product: [Plasma] kwin Reporter: Elias Probst <mail>
Component: decorationsAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: eric.erfanian
Priority: NOR    
Version: 4.9.80   
Target Milestone: 4.10 Beta 2   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In: 4.10
Sentry Crash Report:
Attachments: Moves init after first show
Screenshot of gap

Description Elias Probst 2012-11-24 17:30:43 UTC
The preview of window decorations is somehow broken.
All window decorations except of the currently active one are only rendered completely white/invisible.
When scrolling through the list, fragments of the other decorations appear every now and then as a flickering.
It is impossible to select anything in the list.

I've created a short screencast which demonstrates the issue:
http://www.youtube.com/watch?v=153yP6UTdK0

I'm using:
KDE 4.9.80
Qt 4.8.3
X.org Server 1.13.0
xf86-video-intel from git (08:38:39 PM 11/20/2012)
Comment 1 Thomas Lübking 2012-11-24 17:41:59 UTC
What if you perform a resize operation on the window?
Comment 2 Martin Flöser 2012-11-24 17:47:59 UTC
How do you go to the config module? My experience is that it is only broken 
when using the Alt+F3 menu, but it works when going over systemsettings.
Comment 3 Elias Probst 2012-11-24 19:20:51 UTC
(In reply to comment #1)
> What if you perform a resize operation on the window?
A resize operation shows randomly some fragments of the other decorations, but nothing really usable.
Comment 4 Elias Probst 2012-11-24 19:21:41 UTC
(In reply to comment #2)
> How do you go to the config module? My experience is that it is only broken 
> when using the Alt+F3 menu, but it works when going over systemsettings.

Confirmed!
Works via SystemSettings.
Doesn't work via Alt+F3.
Comment 5 Thomas Lübking 2012-11-24 19:48:33 UTC
what about the naked kcm "kcmshell4 kwindecoration"?
Comment 6 Elias Probst 2012-11-24 19:57:36 UTC
(In reply to comment #5)
> what about the naked kcm "kcmshell4 kwindecoration"?
Works!

Also:
when scrolling, I get to see the messages
> Object::connect: No such signal QObject_QML_1::buttonsChanged()
> Object::connect: No such signal QObject_QML_1::fontChanged()
sometimes.

I have the feeling this happens once the "Plastik" windeco is rendered, because every time when scrolling up/down, the messages appear a short moment before the "Plastik" windeco enters the visible area. I don't know whether this is somehow related to the initial issue or I should report this as a separate bug, as it indicates a missing SLOT/SIGNAL connection setup.
Comment 7 Martin Flöser 2012-11-24 21:20:40 UTC
> (In reply to comment #5)
> 
> > what about the naked kcm "kcmshell4 kwindecoration"?
> 
> Works!
That's also what I could see here
> 
> Also:
> when scrolling, I get to see the messages
> 
> > Object::connect: No such signal QObject_QML_1::buttonsChanged()
> > Object::connect: No such signal QObject_QML_1::fontChanged()
> 
> sometimes.
unrelated and yes the observation with Plastik is correct. It's a signal the 
QML decorations connect to, but are not provided by the kcm. But irrelevant in 
that kcm as it doesn't matter.
Comment 8 Martin Flöser 2012-11-25 19:37:50 UTC
Just played around a little bit:
kcmshell4 kwindecoration
works, but:
kcmshell4 kwindecoration kwinoptions kwinactions kwinfocus kwinmoving kwinadvanced kwinrules kwincompositing kwintabbox kwinscreenedges kwinscript
does not work.

My guess is that it relates to switching to the module after being loaded.
Comment 9 Thomas Lübking 2012-11-25 19:40:34 UTC
I get:
Object::connect: No such signal QObject_QML_1::buttonsChanged()
Object::connect: No such signal QObject_QML_1::fontChanged()

but the display is ok (Qt 4.8.3), regardless of graphicssystem and event dispatcher...
Comment 10 Martin Flöser 2012-11-25 19:48:32 UTC
when using:
kcmshell4 kwindecoration kwincompositing
it does not work, but using
kcmshell4 kwindecoration kwinoptions
does work.

The difference is in the second case decoration is the pre-selected module. 
I'll try overwriting the KCModule::showEvent...
Comment 11 Martin Flöser 2012-11-25 20:02:30 UTC
Created attachment 75477 [details]
Moves init after first show

that patch works for me.

@Elias: I see that you are using Gentoo, so it should not be too difficult to give it a try? I'd like to have some confirmation that it works on more than just on my system ;-)
Comment 12 Elias Probst 2012-11-25 20:05:12 UTC
(In reply to comment #11)
> @Elias: I see that you are using Gentoo, so it should not be too difficult
> to give it a try? I'd like to have some confirmation that it works on more
> than just on my system ;-)

I'll be back with a result in 5 minutes… ;)
Comment 13 Elias Probst 2012-11-25 20:14:06 UTC
The patch works. I'd say "ship it" :)

Thanks for fixing it!
Comment 14 Martin Flöser 2012-11-26 09:08:55 UTC
Git commit d9294294d67b8c7815af84c1a7ac89d8b640e9ca by Martin Gräßlin.
Committed on 26/11/2012 at 10:05.
Pushed by graesslin into branch 'master'.

Create the decoration listing after the KCModule has been shown

If the decoration listing gets initialized directly in the ctor as it
used to be, there is the chance of the list being not rendered in case
that there are multiple KCMs in one container and one has to switch to
the decoration KCM. This is the case for e.g. opening the KWin
configuration through the Alt+F3 menu. But that never happened when
going through Systemsettings as there (at least with English) it is
listed as the first module.
FIXED-IN: 4.10

M  +41   -22   kwin/kcmkwin/kwindecoration/kwindecoration.cpp
M  +2    -0    kwin/kcmkwin/kwindecoration/kwindecoration.h

http://commits.kde.org/kde-workspace/d9294294d67b8c7815af84c1a7ac89d8b640e9ca
Comment 15 eric.erfanian 2013-03-02 19:20:09 UTC
I am encountering this same bug in 4.10 using nvidia proprietary drives. I will attach a screenshot.

The gap occurs after adding a new decoration from GHNS.
Comment 16 eric.erfanian 2013-03-02 19:20:49 UTC
Created attachment 77689 [details]
Screenshot of gap

Gap occurs after adding a new decoration from GHNS.
Comment 17 Thomas Lübking 2013-03-02 19:25:12 UTC
Does rendering fix the moment you (even slightly) resize the window?
Comment 18 eric.erfanian 2013-03-02 20:26:46 UTC
Indeed, the issue is corrected when the window is resized.
Comment 19 Thomas Lübking 2013-03-03 18:00:41 UTC
https://git.reviewboard.kde.org/r/109266/
Comment 20 Thomas Lübking 2013-03-05 19:18:54 UTC
Git commit 4803296de2a11a1712e1c3cb77500ffc261c3945 by Thomas Lübking.
Committed on 03/03/2013 at 18:54.
Pushed by luebking into branch 'KDE/4.10'.

update previews after de/installing a deco
REVIEW: 109266
FIXED-IN: 4.10.2

M  +2    -0    kwin/kcmkwin/kwindecoration/kwindecoration.cpp

http://commits.kde.org/kde-workspace/4803296de2a11a1712e1c3cb77500ffc261c3945
Comment 21 Thomas Lübking 2013-03-05 19:19:28 UTC
Git commit d6b0206248ec89373d70216e9d94d605ee1ab7bb by Thomas Lübking.
Committed on 03/03/2013 at 18:54.
Pushed by luebking into branch 'master'.

update previews after de/installing a deco
REVIEW: 109266
FIXED-IN: 4.10.2

M  +2    -0    kwin/kcmkwin/kwindecoration/kwindecoration.cpp

http://commits.kde.org/kde-workspace/d6b0206248ec89373d70216e9d94d605ee1ab7bb