Pass property minimized from Client to Deleted

Ensures that we can access the minimized property in Effects
which want to not animate a closed, minimized window.

Make use of it in the Fade Effect Script to not fade out a
minimized window which would mean showing the actual not
visible window.

BUG: 303891
FIXED-IN: 4.9.0
REVIEW: 105647
This commit is contained in:
Martin Gräßlin 2012-07-21 18:09:58 +02:00
parent 35baf3f97a
commit fb65e080dc
3 changed files with 8 additions and 1 deletions

View file

@ -36,6 +36,7 @@ Deleted::Deleted(Workspace* ws)
, padding_right(0)
, padding_bottom(0)
, m_layer(UnknownLayer)
, m_minimized(false)
{
}
@ -92,6 +93,7 @@ void Deleted::copyToDeleted(Toplevel* c)
decorationPixmapTop = *client->topDecoPixmap();
decorationPixmapBottom = *client->bottomDecoPixmap();
}
m_minimized = client->isMinimized();
}
}

View file

@ -30,6 +30,7 @@ class Deleted
: public Toplevel
{
Q_OBJECT
Q_PROPERTY(bool minimized READ isMinimized)
public:
static Deleted* create(Toplevel* c);
// used by effects to keep the window around for e.g. fadeout effects when it's destroyed
@ -62,6 +63,9 @@ public:
virtual Layer layer() const {
return m_layer;
}
bool isMinimized() const {
return m_minimized;
}
protected:
virtual void debug(QDebug& stream) const;
virtual bool shouldUnredirect() const;
@ -87,6 +91,7 @@ private:
QRect decoration_bottom;
int padding_left, padding_top, padding_right, padding_bottom;
Layer m_layer;
bool m_minimized;
};
inline void Deleted::refWindow()

View file

@ -24,7 +24,7 @@ function isFadeWindow(w) {
} else if (!w.deleted && effect.isGrabbed(w, Effect.WindowAddedGrabRole)) {
return false;
}
return w.onCurrentDesktop && !isLoginWindow(w) && !w.desktopWindow && !w.utility;
return w.onCurrentDesktop && !isLoginWindow(w) && !w.desktopWindow && !w.utility && !w.minimized;
}
function isLoginWindow(w) {