From kwin Sun Apr 29 21:04:45 2007 From: Rivo Laks Date: Sun, 29 Apr 2007 21:04:45 +0000 To: kwin Subject: Re: Blur effect Message-Id: <200704300004.45307.rivolaks () hot ! ee> X-MARC-Message: https://marc.info/?l=kwin&m=117788063002090 Ühel kenal päeval (pühapäev 29 aprill 2007) kirjutas Lubos Lunak: > On so 28. dubna 2007, Rivo Laks wrote: > > Finally, there is a strange rendering bug when multiple translucent > > windows are active (there's weird 1-pixel border around some widgets > > when/after they're highlighted). Screenshot: > > http://freehackers.org/~rivo/kwin/kwin-blur-bug.jpg Maybe someone can > > guess what's causing this... > > That looks like it paints outside of the actual window area (when a window > moves only its old geometry is marked to be repainted, if something remains > then it's probably outside). It may be some rounding error somewhere, or > possibly the rect adjusting in BlurEffect::updateBlurTexture(), I don't > understand that code much. The rect adjusting was actually meant to prevent this very thing :-S Problem is that if we e.g. have white window on a black one, then the blurred texture will be grey a few pixels outside the white window's area. And if then the white one is deleted, then a bit larger part of the blurred texture has to be update because otherwise those border pixels (just outside the white window) would remain grey. What I missed is that the translucent window using the blurred texture has to be updated at those border regions as well. Otherwise it would still show the obsolete parts of the blurred texture. And this is exactly what seems to be causing this problem. To fix it, I first tried a hackish approach of just repainting a bigger region. This line in prePaintScreen() should have taken care of this: *region = QRegion(region->boundingRect().adjusted(-10, -10, 10, 10)); It should ensure that the region we're repainting is at least 10 pixels wider on every side. But it still doesn't fix the problem :-( The only result of this is that the weird paint error is now about 10 pixels away from the closed window/widget that caused the repaint. And another interesting observation is that the paint errors seem to be only below and to the left of what's causing them. I haven't seen them above or to the right... Anyway, maybe I'm just too tired right now and will get fresh ideas after some sleep. If you come up with any possible problems, let me know. Rivo _______________________________________________ Kwin mailing list Kwin@kde.org https://mail.kde.org/mailman/listinfo/kwin