Visual distortion with sliding popups

Martin Gräßlin kde at martin-graesslin.com
Sun May 9 14:11:37 CEST 2010


Hi,

I think you all have seen the visual distortion when opening e.g. Kickoff with 
Sliding Popups effect (with blur effect it's very visible as you see the 
blurred region before the dialog is shown). Today I tried around a little bit 
and noticed that Lancelot is not showing this problem. So I looked a little 
bit around the source code and changed the following:
Index: applet/applet.cpp
===================================================================
--- applet/applet.cpp   (Revision 1117624)
+++ applet/applet.cpp   (Arbeitskopie)
@@ -70,7 +70,7 @@
     }
 
     launcher = new Kickoff::Launcher(q);
-    launcher->setAttribute(Qt::WA_NoSystemBackground);
+    launcher->setAttribute(Qt::WA_TranslucentBackground);
     launcher->setAutoHide(true);
     QObject::connect(launcher, SIGNAL(aboutToHide()), q, SLOT(hidePopup()));
     QObject::connect(launcher, SIGNAL(configNeedsSaving()), q, 
SIGNAL(configNeedsSaving()));

Restarted Plasma and the issue seems to be gone. Kickoff still does not show 
instantly but it does not show the visual distortion and the second time 
kickoff is opened it's fast and smooth.

So I looked around a little bit more and found the following code segment:
void DialogPrivate::themeChanged()
{
    checkBorders(false);

    const bool translucency = Plasma::Theme::defaultTheme()-
>windowTranslucencyEnabled();
    // WA_NoSystemBackground is going to fail combined with sliding popups, 
but is needed
    // when we aren't compositing
    q->setAttribute(Qt::WA_NoSystemBackground, !translucency);
    updateMask();
}

The WA_TranslucentBackground attribute is set on Dialog, too.

If someone could confirm this observation and the comment in dialog.cpp is 
right I'd say we go through the complete Plasma codebase and fix this annoying 
issue :-)

Regards
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 316 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20100509/1819cafa/attachment.sig 


More information about the Plasma-devel mailing list