Make minimize EffectWindows work through scripting
This commit is contained in:
parent
98dd3ead43
commit
3af37460f8
2 changed files with 11 additions and 1 deletions
|
@ -399,6 +399,15 @@ WINDOW_HELPER_SETTER(unminimize, "minimized",,false)
|
|||
|
||||
#undef WINDOW_HELPER_SETTER
|
||||
|
||||
void EffectWindow::setMinimized(bool min)
|
||||
{
|
||||
if (min) {
|
||||
minimize();
|
||||
} else {
|
||||
unminimize();
|
||||
}
|
||||
}
|
||||
|
||||
void EffectWindow::closeWindow() const
|
||||
{
|
||||
QMetaObject::invokeMethod(parent(), "closeWindow");
|
||||
|
|
|
@ -1184,7 +1184,7 @@ class KWIN_EXPORT EffectWindow : public QObject
|
|||
/**
|
||||
* Whether the window is minimized.
|
||||
**/
|
||||
Q_PROPERTY(bool minimized READ isMinimized)
|
||||
Q_PROPERTY(bool minimized READ isMinimized WRITE setMinimized)
|
||||
/**
|
||||
* Whether the window represents a modal window.
|
||||
**/
|
||||
|
@ -1444,6 +1444,7 @@ public:
|
|||
*/
|
||||
virtual WindowQuadList buildQuads(bool force = false) const = 0;
|
||||
|
||||
void setMinimized(bool minimize);
|
||||
void minimize();
|
||||
void unminimize();
|
||||
Q_SCRIPTABLE void closeWindow() const;
|
||||
|
|
Loading…
Reference in a new issue