Commit fa2e7c43 authored by Martin Flöser's avatar Martin Flöser
Browse files

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
parent 91448e1e
......@@ -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();
}
}
......
......@@ -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()
......
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment