~linaro-maintainers/compiz-plugins-main/overlay-gl

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
=== modified file 'src/grid.cpp'
Index: compiz-plugins-main-0.9.6/grid/src/grid.cpp
===================================================================
--- compiz-plugins-main-0.9.6.orig/grid/src/grid.cpp	2011-10-08 00:03:01.301062568 +0800
+++ compiz-plugins-main-0.9.6/grid/src/grid.cpp	2011-10-08 00:03:28.497197395 +0800
@@ -663,23 +663,20 @@
 			if (edge != NoEdge && check)
 			{
 				CompWindow *cw = screen->findWindow (screen->activeWindow ());
-				if (cw)
-				{
-				    animations.push_back (Animation ());
-				    int current = animations.size () - 1;
-				    animations.at (current).fromRect	= cw->serverBorderRect ();
-				    animations.at (current).currentRect	= cw->serverBorderRect ();
-				    animations.at (current).timer = animations.at (current).duration;
-				    animations.at (current).targetRect = desiredSlot;
+				animations.push_back (Animation ());
+				int current = animations.size () - 1;
+				animations.at (current).fromRect	= cw->serverBorderRect ();
+				animations.at (current).currentRect	= cw->serverBorderRect ();
+				animations.at (current).timer = animations.at (current).duration;
+				animations.at (current).targetRect = desiredSlot;
 
-				    if (lastEdge == NoEdge || !animating)
-				    {
+				if (lastEdge == NoEdge || !animating)
+				{
 					/* Cursor has entered edge region from non-edge region */
 					animating = true;
 					glScreen->glPaintOutputSetEnabled (this, true);
 					cScreen->preparePaintSetEnabled (this, true);
 					cScreen->donePaintSetEnabled (this, true);
-				    }
 				}
 			}
 		}