summaryrefslogtreecommitdiff
path: root/selection.c
diff options
context:
space:
mode:
authorRoi Cohen <roico@roico-desktop.(none)>2007-06-09 15:31:02 +0300
committerRoi Cohen <roico@roico-desktop.(none)>2007-06-09 15:31:02 +0300
commit9661bb3dfc72b9e015f750e01873e6cfc633f398 (patch)
tree026f3d6f60316694e6e9745943a11bd04145c4bf /selection.c
parenta211115d7c0ca2117b51f0b5c03ba75839445f16 (diff)
downloadgroup-9661bb3dfc72b9e015f750e01873e6cfc633f398.tar.gz
group-9661bb3dfc72b9e015f750e01873e6cfc633f398.tar.bz2
fix weird indention in selection.c
Diffstat (limited to 'selection.c')
-rw-r--r--selection.c112
1 files changed, 56 insertions, 56 deletions
diff --git a/selection.c b/selection.c
index 24d7ee3..e4bae72 100644
--- a/selection.c
+++ b/selection.c
@@ -28,61 +28,61 @@
* groupWindowInRegion
*
*/
- static Bool
- groupWindowInRegion(CompWindow *w, Region src, float precision)
- {
- Region buf = XCreateRegion();
- XIntersectRegion(w->region, src, buf);
-
- // buf area
- int i;
- int area = 0;
- BOX *box;
- for(i = 0; i < buf->numRects; i++) {
- box = &buf->rects[i];
- area += (box->x2 - box->x1) * (box->y2 - box->y1); // width * height
- }
-
- XDestroyRegion(buf);
-
- if (area >= WIN_WIDTH(w) * WIN_HEIGHT(w) * precision) {
- XSubtractRegion(src, w->region, src);
- return TRUE;
- }
-
- return FALSE;
- }
-
- /*
- * groupFindGroupInWindows
- *
- */
- static Bool groupFindGroupInWindows(GroupSelection *group, CompWindow **windows, int nWins)
- {
- int i;
- for (i = 0; i < nWins; i++) {
- CompWindow *cw = windows[i];
- GROUP_WINDOW(cw);
- if (gw->group == group)
- return TRUE;
- }
-
- return FALSE;
- }
-
- /*
- * groupFindWindowsInRegion
- *
- */
- CompWindow **groupFindWindowsInRegion(CompScreen * s, Region reg, int *c)
- {
- float precision = groupGetSelectPrecision(s) / 100.0f;
-
- CompWindow **ret = NULL;
- int count = 0;
- CompWindow *w;
- for (w = s->reverseWindows; w; w = w->prev) {
- if (matchEval(groupGetWindowMatch(s), w) &&
+static Bool
+groupWindowInRegion(CompWindow *w, Region src, float precision)
+{
+ Region buf = XCreateRegion();
+ XIntersectRegion(w->region, src, buf);
+
+ // buf area
+ int i;
+ int area = 0;
+ BOX *box;
+ for(i = 0; i < buf->numRects; i++) {
+ box = &buf->rects[i];
+ area += (box->x2 - box->x1) * (box->y2 - box->y1); // width * height
+ }
+
+ XDestroyRegion(buf);
+
+ if (area >= WIN_WIDTH(w) * WIN_HEIGHT(w) * precision) {
+ XSubtractRegion(src, w->region, src);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+/*
+ * groupFindGroupInWindows
+ *
+ */
+static Bool groupFindGroupInWindows(GroupSelection *group, CompWindow **windows, int nWins)
+{
+ int i;
+ for (i = 0; i < nWins; i++) {
+ CompWindow *cw = windows[i];
+ GROUP_WINDOW(cw);
+ if (gw->group == group)
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+/*
+ * groupFindWindowsInRegion
+ *
+ */
+CompWindow **groupFindWindowsInRegion(CompScreen * s, Region reg, int *c)
+{
+ float precision = groupGetSelectPrecision(s) / 100.0f;
+
+ CompWindow **ret = NULL;
+ int count = 0;
+ CompWindow *w;
+ for (w = s->reverseWindows; w; w = w->prev) {
+ if (matchEval(groupGetWindowMatch(s), w) &&
!w->invisible &&
groupWindowInRegion(w, reg, precision))
{
@@ -340,7 +340,7 @@ groupDamageSelectionRect(CompScreen* s, int xRoot, int yRoot)
reg.rects = &reg.extents;
reg.numRects = 1;
- reg.extents.x1 = MIN(gs->x1, gs->x2) - 5;
+ reg.extents.x1 = MIN(gs->x1, gs->x2) - 5;
reg.extents.y1 = MIN(gs->y1, gs->y2) - 5;
reg.extents.x2 = MAX(gs->x1, gs->x2) + 5;
reg.extents.y2 = MAX(gs->y1, gs->y2) + 5;