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
icc-effect-5.14.5
Thomas Lübking 2012-06-19 23:12:37 +02:00
parent bc24400010
commit 9390b270f8
3 changed files with 5 additions and 2 deletions

View File

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

View File

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

View File

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