Take care of your WA_TranslucentBackground flag

Jacopo De Simoi wilderkde at gmail.com
Tue Mar 8 16:46:09 CET 2011


 A few days ago I started investigating about some visual glitches happening with the sliding popup effect,
which are caused by a "bizarre" initial pixmap initialization strategy.

Basically what happens is that under some conditions (most notably when the Qt widget window has 
the Qt::WA_NoSystemBackground flag set) the window pixmap is initialized on creation with a copy
of the portion of screen covered by the window geometry. This can cause trouble when (for instance with 
the sliding popup effect) the window is translated around the screen; you can see for a split second 
(depending on your machine this time can be longer) see parts of your screen replicated and moving around.
Quite a bad glitch indeed. 

Long story short: WA_NoSystemBackground breaks the sliding popup effects, but it is otoh necessary in a non-composited setting. 

The issue is that setting WA_TranslucentBackground automatically sets WA_NoSystemBackground, so one should take care of unsetting the latter flag after setting the former, if compositing is enabled and setting/unsetting it if compositing is disabled/enabled.
Most notably this applies to krunner, to the activity manager and other settings that I may have not noticed. 
It's a quite straightforward fix; I'll fix those two when I have time (if somebody wants to fix them now, plz do!). If you notice
that your piece of code might be impacted by this issue, please have a look and fix it. 
I'm most often on irc if you need help
Thx 

 __J 


More information about the Plasma-devel mailing list