On Thu, Sep 26, 2002 at 12:16:40PM +0000, Mikhael Goikhman wrote: > On 26 Sep 2002 12:14:02 +0200, Olivier Chapuis wrote: > > > > On Thu, Sep 26, 2002 at 10:17:07AM +0200, Olivier Chapuis wrote: > > > > Returning to our flickering. It is annoying. Can the drawing be done > > > > somehow behind the scene, so that the final image (that is the same > > > > image) would not cause flickering? > > > > > > I do not think this is possible. With an icon pix with an alpha > > > channel, we must set the icon bg to the ParentalRelative pixmap. Then > > > when we draw we should first clear the icon bg, with the icon at the > > > good screen position so that the icon bg is "root" transparent. Then > > > we can draw the icon and the alpha channel is well composed with the > > > root bg. The flickering you can see is caused by the icon bg > > > clearing. > > > > > > The only way I see to remove this flickering at focus change, is to > > > compare certain entries of the hi_cs and cs colorsets and to draw only > > > if these entries are different *or* the icons has not been already > > > drawn. This leads to add a new entries in the FvwmWindow struct: "an > > > icon draw count". This is a bit complex for this flickering which is > > > caused by an icon state change (so this is maybe a feature o:) ???? > > > > Ok, I have fixed this flickering. In fact I think that the icon draw > > count is not needed, we always have the appropriate Expose event. > > Can you make some tests? > > It works nicely except that now IconAlpha and IconTint without arguments > do not take effect immediatelly. Only after iconifying/deiconifying. >
Yep, under certain circonstance. Fixed soon. > Still I think it is possible to draw the root bg and then the image in one > step, i.e. without flickering that is still happens if cs != cs_hi. > But this is only my guess, I am not an X expert at all. > Maybe this is possible, but I am sceptical. I've recently make a lot of experimentation with "transparency" and I saw only 3 methods to create transparency. Maybe one day XRender will be able to really give to us Transparency. How to get a window with a transparent background? 1 - Create a window with the ParentRelative pixmap as bg. Map it, you have the root bg on the _visible_ part of the window (that's all, try to XCopyArea the window on a pixmap. Moreover you need a window manager that allows you to set the "frames" bg with the ParentRelative pixmap). 2 - If your server have backing store. Create a window with ParentRelative bg with backing store "Always". Do not map it (optional) but XMoveResize at the wanted position. Clear the window. You have it!!!!!!! This way you can make a screen shot of any part of the root win bg, you can even safely copy the window into a pixmap (backing store). This idea is used to set the _bg_ of a window with a tinted version of the root window bg (Transparent + Tint colorset options, this "works" only with menus, Ident and IconMan at the present time). 3 - You have the pixmap with which the root win bg has been set with (e.g., you use fvwm-root or Esetroot or FvwmBacker with RetainPixmap). Then just use translations and XCopyArea. So the only general method I know is 1. It causes flickering when you want to update an icon with some alpha as you need to clear the bg to reset the bg to the root win bg (so that the alpha composition is good). You cannot do this out of screen. What we can do is to see if method 3 is available and use it if it is. But really, it will be some work for almost nothing ... Olivier -- Visit the official FVWM web page at <URL:http://www.fvwm.org/>. To unsubscribe from the list, send "unsubscribe fvwm-workers" in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]