diff options
author | David Reveman <c99drn@cs.umu.se> | 2006-06-08 18:05:23 +0000 |
---|---|---|
committer | David Reveman <c99drn@cs.umu.se> | 2006-06-08 18:05:23 +0000 |
commit | 69939cdfd17516ed18ab4c8fe3d9b474f5f42b24 (patch) | |
tree | f34131f6fd691d8896d866028d5d1ca28888fea1 /plugins/minimize.c | |
parent | e0021a2e7252c94a19fbca121d22d98a0ce3ba93 (diff) |
Handle initially shaded windows correctly
Diffstat (limited to 'plugins/minimize.c')
-rw-r--r-- | plugins/minimize.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/plugins/minimize.c b/plugins/minimize.c index 39267c2a..0dbff1b3 100644 --- a/plugins/minimize.c +++ b/plugins/minimize.c @@ -981,12 +981,21 @@ minInitWindow (CompPlugin *p, mw->adjust = FALSE; mw->xVelocity = mw->yVelocity = 0.0f; mw->xScaleVelocity = mw->yScaleVelocity = 1.0f; - mw->shade = MAXSHORT; - mw->region = NULL; mw->unmapCnt = 0; - mw->state = mw->newState = minGetWindowState (w); + if (w->shaded) + { + mw->state = mw->newState = NormalState; + mw->shade = 0; + mw->region = XCreateRegion (); + } + else + { + mw->state = mw->newState = minGetWindowState (w); + mw->shade = MAXSHORT; + mw->region = NULL; + } w->privates[ms->windowPrivateIndex].ptr = mw; |