[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kde-workspace] kwin: update composite blocking from deleted, not client
From:       Thomas_Lübking <thomas.luebking () gmail ! com>
Date:       2013-06-26 10:42:07
Message-ID: E1UrnAt-0002rG-1H () scm ! kde ! org
[Download RAW message or body]

Git commit 565357b3c55d108858fc94ee11c3b14f4f68d937 by Thomas Lübking.
Committed on 23/06/2013 at 22:13.
Pushed by luebking into branch 'master'.

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

M  +2    -0    kwin/deleted.cpp
M  +4    -0    kwin/deleted.h
M  +3    -4    kwin/workspace.cpp

http://commits.kde.org/kde-workspace/565357b3c55d108858fc94ee11c3b14f4f68d937

diff --git a/kwin/deleted.cpp b/kwin/deleted.cpp
index de26ae1..5bfc196 100644
--- a/kwin/deleted.cpp
+++ b/kwin/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<Client*>(c);
     if (client) {
+        m_wasClient = true;
         no_border = client->noBorder();
         padding_left = client->paddingLeft();
         padding_right = client->paddingRight();
diff --git a/kwin/deleted.h b/kwin/deleted.h
index 69fb50e..79b93ac 100644
--- a/kwin/deleted.h
+++ b/kwin/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/kwin/workspace.cpp b/kwin/workspace.cpp
index 43b3c5a..e6041ad 100644
--- a/kwin/workspace.cpp
+++ b/kwin/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)

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic