summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Gurgel Pinho <eduardo@mad4.(none)>2008-11-20 21:20:30 -0300
committerEduardo Gurgel Pinho <eduardo@mad4.(none)>2008-11-20 21:20:30 -0300
commit1171d5480cdba4d374f6d12191b0914c57656039 (patch)
tree0c2b0c0e64a52b2fdba63bd0d7a0ac2bcbdcc907
parent4e851d82c2408e5023ee1361a0e6a248cd918ac6 (diff)
downloadsmartput-1171d5480cdba4d374f6d12191b0914c57656039.tar.gz
smartput-1171d5480cdba4d374f6d12191b0914c57656039.tar.bz2
Undo fixed
-rw-r--r--smartput.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/smartput.c b/smartput.c
index db1ee1b..4da90eb 100644
--- a/smartput.c
+++ b/smartput.c
@@ -476,7 +476,7 @@ static unsigned int
smartputUndoResize (CompScreen *s,
XWindowChanges *xwc)
{
- unsigned int mask;
+ unsigned int mask = 0;
SMARTPUT_SCREEN (s);
@@ -509,6 +509,7 @@ smartputInitiate(CompWindow *w,
/*
* Grab the screen
*/
+
if(!sps->grabIndex)
sps->grabIndex = pushScreenGrab (s, s->invisibleCursor, "smartput");
if(!sps->grabIndex)
@@ -521,7 +522,7 @@ smartputInitiate(CompWindow *w,
d = s->display;
SMARTPUT_WINDOW (w);
- free(spw->xwc);
+ if(spw->xwc) free(spw->xwc);
xwc = malloc(sizeof(XWindowChanges));
if(undo)
@@ -832,11 +833,18 @@ smartputDonePaintScreen (CompScreen *s)
if(w)
{
SMARTPUT_WINDOW (w);
+
if(spw->mask && spw->xwc)
- configureXWindow (w, spw->mask, spw->xwc);
- spw->mask = 0;
- free(spw->xwc);
- spw->xwc = NULL;
+ {
+ if (w->mapNum && (spw->mask & (CWWidth | CWHeight)))
+ {
+ sendSyncRequest (w);
+ configureXWindow (w, spw->mask, spw->xwc);
+ }
+ spw->mask = 0;
+ free(spw->xwc);
+ spw->xwc = NULL;
+ }
}
if (sps->grabIndex)
{