summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErkin Bahceci <erkinbah@gmail.com>2009-10-04 15:19:48 -0500
committerErkin Bahceci <erkinbah@gmail.com>2009-10-04 15:19:48 -0500
commitba5d6adee082b7cf394806ead8b4531b645580fa (patch)
treebfa53545af161cb94581252410bcd3bf25840106
parent931288fa0a22db977df05aec78ecd712ed95a71b (diff)
downloadshift-ba5d6adee082b7cf394806ead8b4531b645580fa.tar.gz
shift-ba5d6adee082b7cf394806ead8b4531b645580fa.tar.bz2
Fix switching delay when ended soon after initiation.compiz-0.8
-rw-r--r--shift.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/shift.c b/shift.c
index d399d67..26221c8 100644
--- a/shift.c
+++ b/shift.c
@@ -1675,39 +1675,39 @@ shiftDonePaintScreen (CompScreen *s)
ss->state = ShiftStateSwitching;
if (ss->moveAdjust)
- {
damageScreen (s);
- }
- else if (ss->state == ShiftStateFinish)
- {
- CompWindow *w;
+ }
- CompWindow *pw = NULL;
- int i;
-
- ss->state = ShiftStateIn;
- ss->moreAdjust = TRUE;
- damageScreen (s);
+ if (ss->state == ShiftStateFinish)
+ {
+ CompWindow *w;
- if (!ss->canceled && ss->mvTarget != 0)
- for (i = 0; i < ss->nSlots; i++)
- {
- w = ss->drawSlots[i].w;
- if (ss->drawSlots[i].slot->primary && canStackRelativeTo (w))
- {
- if (pw)
- restackWindowAbove (w,pw);
- pw = w;
- }
- }
+ CompWindow *pw = NULL;
+ int i;
+
+ ss->state = ShiftStateIn;
+ ss->moreAdjust = TRUE;
+ damageScreen (s);
- if (!ss->canceled && ss->selectedWindow &&
- !ss->selectedWindow->destroyed)
+ if (!ss->canceled && ss->mvTarget != 0)
+ for (i = 0; i < ss->nSlots; i++)
+ {
+ w = ss->drawSlots[i].w;
+ if (ss->drawSlots[i].slot->primary && canStackRelativeTo (w))
{
- sendWindowActivationRequest (s, ss->selectedWindow->id);
+ if (pw)
+ restackWindowAbove (w,pw);
+ pw = w;
}
}
+
+ if (!ss->canceled && ss->selectedWindow &&
+ !ss->selectedWindow->destroyed)
+ {
+ sendWindowActivationRequest (s, ss->selectedWindow->id);
+ }
}
+
if (ss->state == ShiftStateNone)
switchActivateEvent (s, FALSE);
}