summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2011-08-19 20:58:20 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2011-08-19 20:58:20 +0800
commitc12c84848c3e8501c6d7330ad970e034c41b1cd6 (patch)
tree23446df663cc7b3cd3f35457f326f1bec7a4c03e
parentd308af97d74b21571368cef0dd7935c77a60b040 (diff)
downloadmobileperf-c12c84848c3e8501c6d7330ad970e034c41b1cd6.tar.gz
mobileperf-c12c84848c3e8501c6d7330ad970e034c41b1cd6.tar.bz2
Fix some other places we were using priv->attrib incorrectly
-rw-r--r--src/privatewindow.h12
-rw-r--r--src/screen.cpp4
-rw-r--r--src/window.cpp33
3 files changed, 25 insertions, 24 deletions
diff --git a/src/privatewindow.h b/src/privatewindow.h
index 91624e4..a20a01c 100644
--- a/src/privatewindow.h
+++ b/src/privatewindow.h
@@ -36,10 +36,14 @@
#define WINDOW_INVISIBLE(w) \
((w)->attrib.map_state != IsViewable || \
- (w)->attrib.x + (w)->width + (w)->output.right <= 0 || \
- (w)->attrib.y + (w)->height + (w)->output.bottom <= 0 || \
- (w)->attrib.x - (w)->output.left >= (int) screen->width () || \
- (w)->attrib.y - (w)->output.top >= (int) screen->height () )
+ (w)->geometry.x () + (w)->geometry.width () + \
+ (w)->geometry.border () * 2 + (w)->output.right <= 0 || \
+ (w)->geometry.y () + (w)->geometry.height () + \
+ (w)->geometry.border () * 2 + (w)->output.bottom <= 0 || \
+ (w)->geometry.x () - \
+ (w)->output.left >= (int) screen->width () || \
+ (w)->geometry.y () - \
+ (w)->output.top >= (int) screen->height () )
typedef CompWindowExtents CompFullscreenMonitorSet;
diff --git a/src/screen.cpp b/src/screen.cpp
index 041f583..acd4a8c 100644
--- a/src/screen.cpp
+++ b/src/screen.cpp
@@ -2036,9 +2036,9 @@ PrivateScreen::configure (XConfigureEvent *ce)
priv->attrib.height = ce->height;
}
- priv->reshape (ce->width, ce->height);
+ priv->reshape (ce->width, ce->height);
- priv->detectOutputDevices ();
+ priv->detectOutputDevices ();
}
void
diff --git a/src/window.cpp b/src/window.cpp
index ceba1ac..d182727 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -796,11 +796,11 @@ PrivateWindow::updateFrameWindow ()
xev.event = screen->root ();
xev.window = priv->frame;
- xev.x = x;
- xev.y = y;
- xev.width = width;
- xev.height = height;
- xev.border_width = window->priv->attrib.border_width;
+ xev.x = serverGeometry.x ();
+ xev.y = serverGeometry.y ();
+ xev.width = serverGeometry.width ();
+ xev.height = serverGeometry.height ();
+ xev.border_width = serverGeometry.border ();
xev.above = (window->prev) ? ROOTPARENT (window->prev) : None;
xev.override_redirect = window->priv->attrib.override_redirect;
@@ -955,6 +955,7 @@ PrivateWindow::updateRegion ()
}
+ /* FIXME: That doesn't look right */
r.x = -priv->attrib.border_width;
r.y = -priv->attrib.border_width;
r.width = priv->width + priv->attrib.border_width;
@@ -1229,10 +1230,10 @@ CompWindow::sendConfigureNotify ()
xev.window = priv->id;
/* normally we should never send configure notify events to override
- redirect windows but if they support the _NET_WM_SYNC_REQUEST
- protocol we need to do this when the window is mapped. however the
- only way we can make sure that the attributes we send are correct
- and is to grab the server. */
+ * redirect windows but if they support the _NET_WM_SYNC_REQUEST
+ * protocol we need to do this when the window is mapped. however the
+ * only way we can make sure that the attributes we send are correct
+ * and is to grab the server. */
if (priv->attrib.override_redirect)
{
XWindowAttributes attrib;
@@ -1397,9 +1398,9 @@ CompWindow::unmap ()
priv->invisible = true;
if (priv->shaded && priv->height)
- resize (priv->attrib.x, priv->attrib.y,
- priv->attrib.width, ++priv->attrib.height - 1,
- priv->attrib.border_width);
+ resize (priv->geometry.x (), priv->geometry.y (),
+ priv->geometry.width (), priv->geometry.height () - 1,
+ priv->geometry.border ());
screen->priv->updateClientList ();
@@ -1712,10 +1713,6 @@ CompWindow::move (int dx,
{
if (dx || dy)
{
- /*
- priv->attrib.x += dx;
- priv->attrib.y += dy;
- */
priv->geometry.setX (priv->geometry.x () + dx);
priv->geometry.setY (priv->geometry.y () + dy);
@@ -4525,7 +4522,7 @@ CompWindow::getMovementForOffset (CompPoint offset)
}
else
{
- m = priv->attrib.y + offY;
+ m = priv->geometry.y () + offY;
if (m - priv->input.top < (int) s->height () - vHeight)
rv.setY (offY + vHeight);
else if (m + priv->height + priv->input.bottom > vHeight)
@@ -5350,7 +5347,7 @@ CompWindow::CompWindow (Window aboveId,
if (priv->attrib.c_class != InputOnly)
{
- priv->region = CompRegion (priv->attrib.x, priv->attrib.y,
+ priv->region = CompRegion (priv->geometry.x (), priv->geometry.y (),
priv->width, priv->height);
priv->inputRegion = priv->region;