From fab8aa9a121abda65a4d11c7de288a5eec666a2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Mon, 24 Jun 2013 00:13:08 +0200 Subject: [PATCH] update composite blocking from deleted, not client fixing bug by deferring the deletion and removal of the deleted to the next event cycle had the side effect that this now happens in the event cycle of the compositor restart, which was deferred to avoid precisely that... so the test is now moved to the removal of the deleted which got an additional flag wasClient to avoid calling this action for each and every tooltip (and might be usable elsewise) BUG: 321537 FIXED-IN: 4.11 REVIEW: 111204 --- deleted.cpp | 2 ++ deleted.h | 4 ++++ workspace.cpp | 7 +++---- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/deleted.cpp b/deleted.cpp index de26ae18e4..5bfc196989 100644 --- a/deleted.cpp +++ b/deleted.cpp @@ -41,6 +41,7 @@ Deleted::Deleted() , m_minimized(false) , m_modal(false) , m_paintRedirector(NULL) + , m_wasClient(false) { } @@ -81,6 +82,7 @@ void Deleted::copyToDeleted(Toplevel* c) cinfo->disable(); Client* client = dynamic_cast(c); if (client) { + m_wasClient = true; no_border = client->noBorder(); padding_left = client->paddingLeft(); padding_right = client->paddingRight(); diff --git a/deleted.h b/deleted.h index 69fb50e0dc..79b93ac06e 100644 --- a/deleted.h +++ b/deleted.h @@ -66,6 +66,9 @@ public: PaintRedirector *decorationPaintRedirector() { return m_paintRedirector; } + bool wasClient() const { + return m_wasClient; + } protected: virtual void debug(QDebug& stream) const; virtual bool shouldUnredirect() const; @@ -93,6 +96,7 @@ private: bool m_modal; ClientList m_mainClients; PaintRedirector *m_paintRedirector; + bool m_wasClient; }; inline void Deleted::refWindow() diff --git a/workspace.cpp b/workspace.cpp index 43b3c5adef..e6041adcd0 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -594,10 +594,6 @@ void Workspace::removeClient(Client* c) updateStackingOrder(true); - if (m_compositor) { - m_compositor->updateCompositeBlocking(); - } - #ifdef KWIN_BUILD_TABBOX if (tabBox->isDisplayed()) tabBox->reset(true); @@ -641,6 +637,9 @@ void Workspace::removeDeleted(Deleted* c) unconstrained_stacking_order.removeAll(c); stacking_order.removeAll(c); x_stacking_dirty = true; + if (c->wasClient() && m_compositor) { + m_compositor->updateCompositeBlocking(); + } } void Workspace::updateToolWindows(bool also_hide)