From 9390b270f83c486c1445d82c2f736d81805ad225 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Tue, 19 Jun 2012 23:12:37 +0200 Subject: [PATCH] substitute mapping_state == Withdrawn by m_managed as the flamewar pointed out, resetShowingDesktop invalidly keeps hidden windows the reason is that there're several updateVisiblity calls (notably one from the compositor) which break the showingDesktop state as a side effect (before ::manage() does it's thing) Since they also invalidate the Withdrawn mapping state, that will fail as isManaged() test (it's also invalidly used by the compositor to set up the decoration, isManaged() used to be true because of the updateVisibility() call before) since the result is never Withdrawn CCBUG: 299655 REVIEW: 105303 --- client.cpp | 3 ++- client.h | 3 ++- manage.cpp | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/client.cpp b/client.cpp index 09b0328587..c541595aea 100644 --- a/client.cpp +++ b/client.cpp @@ -92,6 +92,7 @@ Client::Client(Workspace* ws) , bridge(new Bridge(this)) , move_resize_grab_window(None) , move_resize_has_keyboard_grab(false) + , m_managed(false) , transient_for (NULL) , transient_for_id(None) , original_transient_for_id(None) @@ -1210,7 +1211,7 @@ void Client::updateVisibility() internalHide(Allowed); return; } - if( workspace()->showingDesktop()) { + if (isManaged() && workspace()->showingDesktop()) { bool belongs_to_desktop = false; for (ClientList::ConstIterator it = group()->members().constBegin(); it != group()->members().constEnd(); diff --git a/client.h b/client.h index 3e84d1db17..f31707b3d3 100644 --- a/client.h +++ b/client.h @@ -821,6 +821,7 @@ private: bool unrestrictedMoveResize; int moveResizeStartScreen; static bool s_haveResizeEffect; + bool m_managed; Position mode; QPoint moveOffset; @@ -1184,7 +1185,7 @@ inline int Client::sessionStackingOrder() const inline bool Client::isManaged() const { - return mapping_state != Withdrawn; + return m_managed; } inline QPoint Client::clientPos() const diff --git a/manage.cpp b/manage.cpp index 614fe50c34..4b3ec7cd2b 100644 --- a/manage.cpp +++ b/manage.cpp @@ -587,6 +587,7 @@ bool Client::manage(Window w, bool isMapped) else // doNotShow hideClient(true); // SELI HACK !!! assert(mapping_state != Withdrawn); + m_managed = true; blockGeometryUpdates(false); if (user_time == CurrentTime || user_time == -1U) {