summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2011-03-14 23:58:39 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2011-03-14 23:58:39 +0800
commit44f298aa675d47698efe96f082474b943e80db3f (patch)
tree25e18ba458c6cfd953b5921f53ca18532c2db99a
parent2c3804f02558504971a6700e06f9e515a840e94d (diff)
downloadgroup-44f298aa675d47698efe96f082474b943e80db3f.tar.gz
group-44f298aa675d47698efe96f082474b943e80db3f.tar.bz2
Update for new core API
-rw-r--r--src/glow.cpp10
-rw-r--r--src/group.h8
-rw-r--r--src/paint.cpp26
-rw-r--r--src/tab.cpp20
4 files changed, 32 insertions, 32 deletions
diff --git a/src/glow.cpp b/src/glow.cpp
index 64bae6a..ef65525 100644
--- a/src/glow.cpp
+++ b/src/glow.cpp
@@ -61,12 +61,12 @@ GroupWindow::getOutputExtents (CompWindowExtents &output)
glowSize = glowSize * (glowTextureSize - glowOffset) / glowTextureSize;
/* glowSize is the size of the glow outside the window decoration
- * (w->input), while w->output includes the size of w->input
+ * (w->border), while w->output includes the size of w->border
* this is why we have to add w->input here */
- output.left = MAX (output.left, glowSize + window->input ().left);
- output.right = MAX (output.right, glowSize + window->input ().right);
- output.top = MAX (output.top, glowSize + window->input ().top);
- output.bottom = MAX (output.bottom, glowSize + window->input ().bottom);
+ output.left = MAX (output.left, glowSize + window->border ().left);
+ output.right = MAX (output.right, glowSize + window->border ().right);
+ output.top = MAX (output.top, glowSize + window->border ().top);
+ output.bottom = MAX (output.bottom, glowSize + window->border ().bottom);
}
}
diff --git a/src/group.h b/src/group.h
index 2c7fdf2..06d2940 100644
--- a/src/group.h
+++ b/src/group.h
@@ -103,12 +103,12 @@ extern bool gTextAvailable;
#define WIN_CENTER_Y(w) (WIN_Y (w) + (WIN_HEIGHT (w) / 2))
/* definitions used for glow painting */
-#define WIN_REAL_X(w) (w->x () - w->input ().left)
-#define WIN_REAL_Y(w) (w->y () - w->input ().top)
+#define WIN_REAL_X(w) (w->x () - w->border ().left)
+#define WIN_REAL_Y(w) (w->y () - w->border ().top)
#define WIN_REAL_WIDTH(w) (w->width () + 2 * w->geometry ().border () + \
- w->input ().left + w->input ().right)
+ w->border ().left + w->border ().right)
#define WIN_REAL_HEIGHT(w) (w->height () + 2 * w->geometry ().border () + \
- w->input ().top + w->input ().bottom)
+ w->border ().top + w->border ().bottom)
#define TOP_TAB(g) ((g)->mTabBar->mTopTab->mWindow)
#define PREV_TOP_TAB(g) ((g)->mTabBar->mPrevTopTab->mWindow)
diff --git a/src/paint.cpp b/src/paint.cpp
index 1fec532..f2e1911 100644
--- a/src/paint.cpp
+++ b/src/paint.cpp
@@ -860,32 +860,32 @@ GroupWindow::getStretchRectangle (CompRect &box,
int width, height;
float xScale, yScale;
- x1 = mResizeGeometry.x () - window->input ().left;
- y1 = mResizeGeometry.y () - window->input ().top;
+ x1 = mResizeGeometry.x () - window->border ().left;
+ y1 = mResizeGeometry.y () - window->border ().top;
x2 = mResizeGeometry.x () + mResizeGeometry.width () +
- window->serverGeometry ().border () * 2 + window->input ().right;
+ window->serverGeometry ().border () * 2 + window->border ().right;
if (window->shaded ())
{
- y2 = mResizeGeometry.y () + window->height () + window->input ().bottom;
+ y2 = mResizeGeometry.y () + window->height () + window->border ().bottom;
}
else
{
y2 = mResizeGeometry.y () + mResizeGeometry.height () +
window->serverGeometry ().border () * 2 +
- window->input ().bottom;
+ window->border ().bottom;
}
- width = window->width () + window->input ().left +
- window->input ().right;
- height = window->height () + window->input ().top +
- window->input ().bottom;
+ width = window->width () + window->border ().left +
+ window->border ().right;
+ height = window->height () + window->border ().top +
+ window->border ().bottom;
xScale = (width) ? (x2 - x1) / (float) width : 1.0f;
yScale = (height) ? (y2 - y1) / (float) height : 1.0f;
- x1 = x1 - (window->output ().left - window->input ().left) * xScale;
- y1 = y1 - (window->output ().top - window->input ().top) * yScale;
+ x1 = x1 - (window->output ().left - window->border ().left) * xScale;
+ y1 = y1 - (window->output ().top - window->border ().top) * yScale;
x2 = x2 + window->output ().right * xScale;
y2 = y2 + window->output ().bottom * yScale;
@@ -1164,8 +1164,8 @@ GroupWindow::glPaint (const GLWindowPaintAttrib &attrib,
/* Get the scale amount for the resize box */
getStretchRectangle (box, xScale, yScale);
- xOrigin = window->x () - w->input ().left;
- yOrigin = window->y () - w->input ().top;
+ xOrigin = window->x () - w->border ().left;
+ yOrigin = window->y () - w->border ().top;
wTransform.translate (xOrigin, yOrigin, 0.0f);
wTransform.scale (xScale, yScale, 1.0f);
diff --git a/src/tab.cpp b/src/tab.cpp
index e46af21..d0f289f 100644
--- a/src/tab.cpp
+++ b/src/tab.cpp
@@ -1141,10 +1141,10 @@ GroupScreen::updateTabBars (Window enteredWin)
CompRegion reg;
/* titlebar of the window */
- rect = CompRect (WIN_X (w) - w->input ().left,
- WIN_Y (w) - w->input ().top,
- WIN_WIDTH (w) + w->input ().right,
- WIN_Y (w) - (WIN_Y (w) - w->input ().top));
+ rect = CompRect (WIN_X (w) - w->border ().left,
+ WIN_Y (w) - w->border ().top,
+ WIN_WIDTH (w) + w->border ().right,
+ WIN_Y (w) - (WIN_Y (w) - w->border ().top));
reg = reg.united (rect);
@@ -1309,8 +1309,8 @@ GroupWindow::constrainMovement (CompRegion constrainRegion,
if (!dx && !dy)
return false;
- x = mOrgPos.x () - w->input ().left + dx;
- y = mOrgPos.y ()- w->input ().top + dy;
+ x = mOrgPos.x () - w->border ().left + dx;
+ y = mOrgPos.y ()- w->border ().top + dy;
width = WIN_REAL_WIDTH (w);
height = WIN_REAL_HEIGHT (w);
@@ -1333,7 +1333,7 @@ GroupWindow::constrainMovement (CompRegion constrainRegion,
dx += (dx < 0) ? 1 : -1;
/* new x value is based on our new dx value */
- x = mOrgPos.x () - w->input ().left + dx;
+ x = mOrgPos.x () - w->border ().left + dx;
}
/* Adjust dx */
@@ -1351,7 +1351,7 @@ GroupWindow::constrainMovement (CompRegion constrainRegion,
dy += (dy < 0) ? 1 : -1;
/* new x value is based on our new dx value */
- y = mOrgPos.y () - w->input ().top + dy;
+ y = mOrgPos.y () - w->border ().top + dy;
}
new_dx = dx;
@@ -1467,8 +1467,8 @@ GroupSelection::startTabbingAnimation (bool tab)
int dx, dy;\
int constrainStatus;
GroupWindow *gw = GroupWindow::get (w);
- CompRect statusRect (gw->mOrgPos.x () - w->input ().left,
- gw->mOrgPos.y () - w->input ().top,
+ CompRect statusRect (gw->mOrgPos.x () - w->border ().left,
+ gw->mOrgPos.y () - w->border ().top,
WIN_REAL_WIDTH (w),
WIN_REAL_HEIGHT (w));