Menu

#1813 flickering with -alpha transparency manipulations

obsolete: 8.5a3
open
5
2004-12-14
2004-12-14
No

The attached script makes windows (WinXP) smoothly
transition from -alpha 0.0 to -alpha 1.0 (in fact a
little bit larger than 1.0 which might be the root of
the problem), and at the last step the entire window
suddenly flickers horribly.

i.e. the transition from 0.0 to 0.99 is really nice and
then just as the window reaches 1.0 or thereabouts,
there's a horrible flicker..

Discussion

  • Vince Darley

    Vince Darley - 2004-12-14

    script to illustrate problem on WinXP

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2004-12-14

    Logged In: YES
    user_id=72656

    This is a known issue and was discussed on clt. The problem
    is the transition of Windows window classes, which causes an
    update of the wrapper window (and the flicker). This occurs
    at any !=1.0 to 1.0 transition.

    The solutions are not simple ... the problem is that to
    support alpha transparency, you have to use a much more
    memory hungry window class, which is for obvious reasons not
    the default class. I may TIP up a solution that adds a wm
    attr -class option that is automatically mangled with
    changes in certain other attr settings, but there is no user
    transparent way to handle this.

    The work-around is to stop at 0.99, if you intend to keep
    something optionally transparent. This is fully opaque from
    a transparency perspective, but keeps the
    transparent-enabled window class.

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2004-12-14
    • status: open --> closed-wont-fix
     
  • Vince Darley

    Vince Darley - 2004-12-14
    • status: closed-wont-fix --> open-wont-fix
     
  • Vince Darley

    Vince Darley - 2004-12-14

    Logged In: YES
    user_id=32170

    Given that -alpha transitions are largely used for cosmetic
    purposes (often for windows which are transient in nature),
    wouldn't it make sense to simply adopt the policy that if a
    window has ever had a non 1.0 transparency that we always
    use the transparent-capable class?

    This would solve the problem at the expense of some amount
    of memory (according to your comments), which is likely to
    be freed up soon anyway, since most such windows are transient.

    Failing that this should be documented as a known bug in the
    Tk man pages, shouldn't it?

     
  • Vince Darley

    Vince Darley - 2004-12-14
    • status: open-wont-fix --> open
     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2004-12-14

    Logged In: YES
    user_id=72656

    This is not a bug - this is a behavior, and it could be
    documented. This is not at all the only thing to cause such
    flickering - a lot of 'wm' operations will cause it, if you
    hadn't noticed before.

    As for switching ... we could set a flag I suppose, but if
    you look at the code, it isn't otherwise trivial to know
    this. As I said, lots of 'wm' calls can force a wrapper update.

     
MongoDB Logo MongoDB