Bug 205596 - Incorrect rendering of decoration buttons when compositing is enabled
Summary: Incorrect rendering of decoration buttons when compositing is enabled
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-29 17:46 UTC by Hugo Pereira Da Costa
Modified: 2009-08-29 23:44 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hugo Pereira Da Costa 2009-08-29 17:46:56 UTC
Version:            (using Devel)
Compiler:          gcc 4.4.1 
OS:                Linux
Installed from:    Compiled sources

Many decorations (namely: keramik, laptop, modern system, quartz, redmond, and web) have incorrect button rendering when compositing is enabled.
The "black" portions of the buttons are "see-through": one can see the window/or background that is behind, through the button, as if it was actually a "hole" in the window.

I think it is an issue with painting a "QBitmap" on the decoration, probably related to using ARGB. Other decorations, which do not use QBitmap do not have the problem.

Might be a Qt problem. (using qt4.5.2)
Comment 1 Thomas Lübking 2009-08-29 18:14:17 UTC
you're right: it's the QBitmap (systematic problem, a bitmap is binary data and thus applies to all channels of the 32bit data - including the alpha channel)

One should use a QPainterPath instead.
I fixed that somewhen back for the kde2 deco:
http://websvn.kde.org/trunk/KDE/kdebase/workspace/kwin/clients/kde2/kde2.cpp?r1=743055&r2=982672
Comment 2 Hugo Pereira Da Costa 2009-08-29 22:28:54 UTC
Thomas: 
Great. That works like a charm. Will fix (that's pretty easy) and commit.
Thanks for the tip.
Comment 3 Thomas Lübking 2009-08-29 22:52:09 UTC
while at it, keep an eye open for WA_NoBackground and WA_OpaquePaintEvent (they're the same)
from my experience only WA_NoSystemBackground prevents Qt from painting junk on indirect rendering (don't unset WA_PaintOnScreen - it will make the client waste a lot of memory for no-sense dbl.buffering)
Comment 4 Hugo Pereira Da Costa 2009-08-29 23:44:08 UTC
All faulty decorations have been fixed, checked, and committed. I think.