~compiz-team/compiz-animation-plugin/0.9.5

Viewing all changes in revision 397.

  • Committer: Daniel van Vugt
  • Author(s): Sam Spilsbury
  • Date: 2012-04-10 07:50:26 UTC
  • mfrom: (395.2.1 compiz-animation-plugin)
  • Revision ID: daniel.van.vugt@canonical.com-20120410075026-p6zgp7yimcww1c9s
Don't increment the destroy ref count of a window unless an animation is
active. (LP: #940603)

It doesn't make any sense to increase the destroy reference count of a window
on CompWindowNotifyBeforeDestroy based on whether or not an an animation for
that window "could" be allowed - CompWindowNotifyBeforeDestroyed is called
on CompWindow::destroy (which under sane circumstances, should only ever be
called when the window is either reparented away from its parent or the root
window or when the window is destroyed).

In this case, we deregister all events on the window so it isn't possible to
determine through any normal means that a close animation is going to activate
on the window. And in any event, the unmap which causes close animations
always comes before the DestroyNotify or ReparentNotify anyways.

Even if the CompWindowNotifyClose were to somehow come after the window
received a ReparentNotify or DestroyNotify, the tradeoff then comes between
not playing animations for those corner case windows or keeping ghost windows
on screen because we kept a destroy reference and never got rid of it. In this
case, it is more sane to do the former.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: