summaryrefslogtreecommitdiff
path: root/plugins/minimize.c
diff options
context:
space:
mode:
authorDavid Reveman <c99drn@cs.umu.se>2006-03-16 17:50:08 +0000
committerDavid Reveman <c99drn@cs.umu.se>2006-03-16 17:50:08 +0000
commitc650a9252eb6ebd4f96939f557258843351d713f (patch)
treee06096fe603da8030128705e7153b9a75d73d367 /plugins/minimize.c
parentdd137952563bf1b21bfb7b8c6fa47e934e040dc2 (diff)
Fix window state changes and sending of configure notify events
Diffstat (limited to 'plugins/minimize.c')
-rw-r--r--plugins/minimize.c39
1 files changed, 26 insertions, 13 deletions
diff --git a/plugins/minimize.c b/plugins/minimize.c
index 0fa08973..05e3f0b9 100644
--- a/plugins/minimize.c
+++ b/plugins/minimize.c
@@ -533,29 +533,42 @@ minHandleEvent (CompDisplay *d,
break;
case UnmapNotify:
w = findWindowAtDisplay (d, event->xunmap.window);
- if (w && (w->state & CompWindowStateHiddenMask))
+ if (w)
{
MIN_SCREEN (w->screen);
- if (!w->invisible && (ms->wMask & w->type))
+ if (w->pendingUnmaps) /* Normal -> Iconic */
{
- MIN_WINDOW (w);
+ if (!w->invisible && (ms->wMask & w->type))
+ {
+ MIN_WINDOW (w);
- mw->newState = IconicState;
+ mw->newState = IconicState;
- if (minGetWindowIconGeometry (w, &mw->icon))
- {
- mw->adjust = TRUE;
- ms->moreAdjust = TRUE;
+ if (minGetWindowIconGeometry (w, &mw->icon))
+ {
+ mw->adjust = TRUE;
+ ms->moreAdjust = TRUE;
- mw->unmapCnt++;
- w->unmapRefCnt++;
+ mw->unmapCnt++;
+ w->unmapRefCnt++;
- addWindowDamage (w);
+ addWindowDamage (w);
+ }
+ else
+ {
+ mw->state = mw->newState;
+ }
}
- else
+ }
+ else /* X -> Withdrawn */
+ {
+ MIN_WINDOW (w);
+
+ if (mw->state == IconicState)
{
- mw->state = mw->newState;
+ (*w->screen->setWindowScale) (w, 1.0f, 1.0f);
+ mw->state = NormalState;
}
}
}