Skip to content
  • Vlad Zahorodnii's avatar
    x11: Fix BadDamage warning · 29ff0d30
    Vlad Zahorodnii authored
    The XDamageDestroy has a weird requirement saying that it can be called
    as long as the X11 window is still valid. On the other hand, one could
    argue that it is more intuitive if the damage handle becomes inert if the
    associated window is destroyed. Unfortunately, that's not the case and
    as git history shows, it's an easy way to shoot yourself in the foot, we
    had the exact warning many years ago.
    
    The problem with the XDamageDestroy API is that it is simply unreliable
    given the asynchronous nature of communication between kwin and xorg.
    
    Anyway, with X11 sunsetting, let's destroy the damage handle only when
    the X11 window is unmapped and not bother too much about it.
    29ff0d30