summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <smspillaz@gmail.com>2010-08-17 23:26:40 +0800
committerSam Spilsbury <smspillaz@gmail.com>2010-08-17 23:26:40 +0800
commit979cb7d93877770e9bdd6123642acf60f189a8e5 (patch)
tree0643fe547b4e1362acffa37890f9a4f416019d30
parente74f916ae74f8a5a27942cc3f622eab4de037670 (diff)
parent6c7f100b40e241b0232776995ae3ebaec33d6a2f (diff)
downloadworkarounds-979cb7d93877770e9bdd6123642acf60f189a8e5.tar.gz
workarounds-979cb7d93877770e9bdd6123642acf60f189a8e5.tar.bz2
Merge branch 'master' of git+ssh://git.opencompositing.org/git/compiz/plugins/workarounds
-rw-r--r--src/workarounds.cpp33
1 files changed, 18 insertions, 15 deletions
diff --git a/src/workarounds.cpp b/src/workarounds.cpp
index 78a4316..06efca1 100644
--- a/src/workarounds.cpp
+++ b/src/workarounds.cpp
@@ -169,6 +169,7 @@ WorkaroundsWindow::isGroupTransient (Window clientLeader)
return false;
}
+
void
WorkaroundsWindow::minimize ()
@@ -176,7 +177,7 @@ WorkaroundsWindow::minimize ()
if (!window->managed ())
return;
- if (!window->minimized ())
+ if (!isMinimized)
{
WORKAROUNDS_SCREEN (screen);
@@ -210,7 +211,6 @@ WorkaroundsWindow::minimize ()
Atoms::wmState, Atoms::wmState,
32, PropModeReplace, (unsigned char *) data, 2);
-
propTemplate.at (0).set (enabled);
ws->inputDisabledAtom.updateProperty (window->id (),
propTemplate,
@@ -223,7 +223,7 @@ WorkaroundsWindow::minimize ()
void
WorkaroundsWindow::unminimize ()
-{
+{
if (isMinimized)
{
WORKAROUNDS_SCREEN (screen);
@@ -332,24 +332,27 @@ WorkaroundsScreen::checkFunctions (bool checkWindow, bool checkScreen)
screen->handleEventSetEnabled (this, false);
}
- if (optionGetLegacyFullscreen () && checkWindow)
+ if (checkWindow)
{
+ bool legacyFullscreen = optionGetLegacyFullscreen ();
+ bool keepMinimized = optionGetKeepMinimizedWindows ();
+
foreach (CompWindow *w, screen->windows ())
{
WORKAROUNDS_WINDOW (w);
- ww->window->getAllowedActionsSetEnabled (ww, true);
- ww->window->resizeNotifySetEnabled (ww, true);
- }
- }
- else if (checkWindow)
- {
- foreach (CompWindow *w, screen->windows ())
- {
- WORKAROUNDS_WINDOW (w);
+ bool m = ww->window->minimized ();
- ww->window->getAllowedActionsSetEnabled (ww, false);
- ww->window->resizeNotifySetEnabled (ww, false);
+ ww->window->getAllowedActionsSetEnabled (ww, legacyFullscreen);
+ ww->window->resizeNotifySetEnabled (ww, legacyFullscreen);
+
+ if (m)
+ ww->window->unminimize ();
+ ww->window->minimizeSetEnabled (ww, keepMinimized);
+ ww->window->unminimizeSetEnabled (ww, keepMinimized);
+ ww->window->minimizedSetEnabled (ww, keepMinimized);
+ if (m)
+ ww->window->minimize ();
}
}
}