On 26 Sep 2002 12:14:02 +0200, Olivier Chapuis wrote: > > On Thu, Sep 26, 2002 at 10:17:07AM +0200, Olivier Chapuis wrote: > > > > I think we need a lot of new icon styles: > > > > IconTitleColorset > > HilightIconTitleColorset > > IconBackgroundStyle [Colorset cset] [Frame x] [Padding x y] > > > > and maybe a HilightIconBackgroundStyle.
Maybe. It seems to be needed. But then maybe incorporate IconSize into this as well? Something like: Style * IconStyle \ TitleColorset cs, \ # defaults to Colorset HilightTitleColorset cs, \ # defaults to HilightColorset FrameColorset cs, \ # defaults to Colorset HilightFrameColorset cs, \ # defaults to FrameColorset/HilightColorset [!]Transparent, \ # defaults to True, for *FrameColorset Padding x y, \ # defaults to 0 0 Relief n, \ # defaults to 0 Size [x y [x2 y2]], \ # defaults to -1 -1 -1 -1, now IconSize But this is only a way to group options. I think you suggest to divide this differently if hilight icons may have another size, something like: Style * IconStyle \ TitleColorset cs, \ # defaults to Colorset FrameColorset cs, \ # defaults to Colorset [!]Transparent, \ # defaults to True, for FrameColorset Padding x y, \ # defaults to 0 0 Relief n, \ # defaults to 0 Size [x y [x2 y2]], \ # defaults to -1 -1 -1 -1, now IconSize Style * HilightIconStyle \ TitleColorset cs, \ # defaults to HilightColorset FrameColorset cs, \ # defaults to IconStyle/HilightColorset [!]Transparent, \ # defaults to IconStyle/True Padding x y, \ # defaults to IconStyle/0 0 Relief n, \ # defaults to IconStyle/0 Size [x y [x2 y2]], \ # defaults to IconStyle/-1 -1 -1 -1 Of course, it is possible to think about other functional divisions. Any of these are ok for me, but the second allows more fun effects. But adding effects that will flicker anyway is not that good. :) > > > 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. 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. Regards, Mikhael. -- 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]