summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@compiz-fusion.org>2009-01-22 22:49:03 +0100
committerDennis kasprzyk <onestone@compiz-fusion.org>2009-01-22 22:49:03 +0100
commita690a55fedf46495302abd19b5a89b1776ad9799 (patch)
treecee3afc65e13a857c502d3e2ba4856f0358f3b47
parent222f5e4889f2d73cc6b832736aad0dca38075982 (diff)
downloadautoresize-a690a55fedf46495302abd19b5a89b1776ad9799.tar.gz
autoresize-a690a55fedf46495302abd19b5a89b1776ad9799.tar.bz2
Fixed snapping.
-rw-r--r--snap.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/snap.cpp b/snap.cpp
index 938c2e0..5252139 100644
--- a/snap.cpp
+++ b/snap.cpp
@@ -351,7 +351,7 @@ SnapWindow::moveCheckNearestEdge (int position,
{
SNAP_SCREEN (screen);
- Edge &edge = edges.front ();
+ Edge *edge = &edges.front ();
int dist, min = 65535;
foreach (Edge &current, edges)
@@ -366,7 +366,7 @@ SnapWindow::moveCheckNearestEdge (int position,
if (dist < min && dist >= 0)
{
min = dist;
- edge = current;
+ edge = &current;
}
// 0-dist edge, just break
if (dist == 0)
@@ -383,12 +383,12 @@ SnapWindow::moveCheckNearestEdge (int position,
if (ss->optionGetSnapTypeMask () & SnapTypeEdgeResistanceMask)
{
snapped = true;
- snapDirection |= snapDirection;
+ this->snapDirection |= snapDirection;
}
// Attract the window if needed, moving it of the correct dist
- if (min != 0 && !edge.snapped)
+ if (min != 0 && !edge->snapped)
{
- edge.snapped = true;
+ edge->snapped = true;
switch (type)
{
case LeftEdge:
@@ -445,7 +445,7 @@ SnapWindow::resizeCheckNearestEdge (int position,
{
SNAP_SCREEN (screen);
- Edge &edge = edges.front ();
+ Edge *edge = &edges.front ();
int dist, min = 65535;
foreach (Edge &current, edges)
@@ -460,7 +460,7 @@ SnapWindow::resizeCheckNearestEdge (int position,
if (dist < min && dist >= 0)
{
min = dist;
- edge = current;
+ edge = &current;
}
// 0-dist edge, just break
if (dist == 0)
@@ -477,13 +477,13 @@ SnapWindow::resizeCheckNearestEdge (int position,
if (ss->optionGetSnapTypeMask () & SnapTypeEdgeResistanceMask)
{
snapped = true;
- snapDirection |= snapDirection;
+ this->snapDirection |= snapDirection;
}
// FIXME : this needs resize-specific code.
// Attract the window if needed, moving it of the correct dist
- if (min != 0 && !edge.snapped)
+ if (min != 0 && !edge->snapped)
{
- edge.snapped = true;
+ edge->snapped = true;
switch (type)
{
case LeftEdge: