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
This commit is contained in:
Thomas Lübking 2013-06-24 00:13:08 +02:00
parent 4a426d731d
commit fab8aa9a12
3 changed files with 9 additions and 4 deletions

View file

@ -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();

View file

@ -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()

View file

@ -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)