ignore dockers for showingDesktop state
also use a common funciton to decide whether or not to break the state BUG: 305874 FIXED-IN: 4.9.1
This commit is contained in:
parent
3460d5b551
commit
7d2e62b487
3 changed files with 18 additions and 22 deletions
28
client.cpp
28
client.cpp
|
@ -1210,21 +1210,25 @@ void Client::updateVisibility()
|
||||||
internalHide(Allowed);
|
internalHide(Allowed);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if( workspace()->showingDesktop()) {
|
resetShowingDesktop(true);
|
||||||
bool belongs_to_desktop = false;
|
|
||||||
for (ClientList::ConstIterator it = group()->members().constBegin();
|
|
||||||
it != group()->members().constEnd();
|
|
||||||
++it)
|
|
||||||
if ((*it)->isDesktop()) {
|
|
||||||
belongs_to_desktop = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (!belongs_to_desktop)
|
|
||||||
workspace()->resetShowingDesktop(true);
|
|
||||||
}
|
|
||||||
internalShow(Allowed);
|
internalShow(Allowed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Client::resetShowingDesktop(bool keep_hidden)
|
||||||
|
{
|
||||||
|
if (isDock() || !workspace()->showingDesktop())
|
||||||
|
return;
|
||||||
|
bool belongs_to_desktop = false;
|
||||||
|
for (ClientList::ConstIterator it = group()->members().constBegin(),
|
||||||
|
end = group()->members().constEnd(); it != end; ++it)
|
||||||
|
if ((belongs_to_desktop == (*it)->isDesktop()))
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (!belongs_to_desktop)
|
||||||
|
workspace()->resetShowingDesktop(keep_hidden);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the client window's mapping state. Possible values are
|
* Sets the client window's mapping state. Possible values are
|
||||||
* WithdrawnState, IconicState, NormalState.
|
* WithdrawnState, IconicState, NormalState.
|
||||||
|
|
1
client.h
1
client.h
|
@ -682,6 +682,7 @@ private:
|
||||||
bool processDecorationButtonPress(int button, int state, int x, int y, int x_root, int y_root,
|
bool processDecorationButtonPress(int button, int state, int x, int y, int x_root, int y_root,
|
||||||
bool ignoreMenu = false);
|
bool ignoreMenu = false);
|
||||||
Client* findAutogroupCandidate() const;
|
Client* findAutogroupCandidate() const;
|
||||||
|
void resetShowingDesktop(bool keep_hidden);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void debug(QDebug& stream) const;
|
virtual void debug(QDebug& stream) const;
|
||||||
|
|
11
manage.cpp
11
manage.cpp
|
@ -558,16 +558,7 @@ bool Client::manage(Window w, bool isMapped)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool belongs_to_desktop = false;
|
resetShowingDesktop(options->isShowDesktopIsMinimizeAll());
|
||||||
for (ClientList::ConstIterator it = group()->members().constBegin();
|
|
||||||
it != group()->members().constEnd();
|
|
||||||
++it)
|
|
||||||
if ((*it)->isDesktop()) {
|
|
||||||
belongs_to_desktop = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (!belongs_to_desktop && workspace()->showingDesktop())
|
|
||||||
workspace()->resetShowingDesktop(options->isShowDesktopIsMinimizeAll());
|
|
||||||
|
|
||||||
if (isOnCurrentDesktop() && !isMapped && !allow && (!session || session->stackingOrder < 0))
|
if (isOnCurrentDesktop() && !isMapped && !allow && (!session || session->stackingOrder < 0))
|
||||||
workspace()->restackClientUnderActive(this);
|
workspace()->restackClientUnderActive(this);
|
||||||
|
|
Loading…
Reference in a new issue