Fix minimize rule

It was only applied initially, but force did not work.
REVIEW: 103364
This commit is contained in:
Martin Gräßlin 2011-12-09 14:39:17 +01:00
parent 786252f7ef
commit 3955d891d6

View file

@ -976,6 +976,9 @@ void Client::minimize(bool avoid_animation)
{ {
if (!isMinimizable() || isMinimized()) if (!isMinimizable() || isMinimized())
return; return;
if (!rules()->checkMinimize(true)) {
return;
}
#ifdef KWIN_BUILD_SCRIPTING #ifdef KWIN_BUILD_SCRIPTING
//Scripting call. Does not use a signal/slot mechanism //Scripting call. Does not use a signal/slot mechanism
@ -1011,6 +1014,10 @@ void Client::unminimize(bool avoid_animation)
if (!isMinimized()) if (!isMinimized())
return; return;
if (rules()->checkMinimize(false)) {
return;
}
#ifdef KWIN_BUILD_SCRIPTING #ifdef KWIN_BUILD_SCRIPTING
SWrapper::WorkspaceProxy* ws_wrap = SWrapper::WorkspaceProxy::instance(); SWrapper::WorkspaceProxy* ws_wrap = SWrapper::WorkspaceProxy::instance();
if (ws_wrap != 0) { if (ws_wrap != 0) {