# HG changeset patch # User cannam # Date 1326720460 0 # Mon Jan 16 13:27:40 2012 +0000 # Branch wmx # Node ID 295eae7831d8ffc334eb2a106a632710c30765f3 # Parent 34adfd61badbc2e4a9472af429091911435bc796 Avoid setting revert to oneself, causing crashes when reverting following window close in click-focus diff --git a/Client.C b/Client.C --- a/Client.C +++ b/Client.C @@ -611,6 +611,8 @@ // & some other-screen business } */ + Client *previouslyActive = windowManager()->activeClient(); + windowManager()->setActiveClient(this); // deactivates any other XUngrabButton(display(), AnyButton, AnyModifier, parent()); @@ -627,8 +629,12 @@ windowManager()->skipInRevert(this, m_revert); - m_revert = activeClient(); - while (m_revert && !m_revert->isNormal()) m_revert = m_revert->revertTo(); + if (previouslyActive && previouslyActive != this) { + m_revert = previouslyActive; + while (m_revert && !m_revert->isNormal()) { + m_revert = m_revert->revertTo(); + } + } //!!! windowManager()->setActiveClient(this); decorate(True);