summaryrefslogtreecommitdiff
path: root/openbox
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-05-27 16:33:59 +0000
committerDana Jansens <danakj@orodu.net>2007-05-27 16:33:59 +0000
commit01a7a9edb7617f3e0ae09a84207faa0dcdf71306 (patch)
tree5bcbbeaf260e0f2c7ca1fcd4dc25d719f86b6df6 /openbox
parent8e19e99ac8e5a4e7e9721b10447c4b90f17c2c8f (diff)
fix window gravity when there is a border width
Diffstat (limited to 'openbox')
-rw-r--r--openbox/frame.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/openbox/frame.c b/openbox/frame.c
index 780bc23d..b6b6ac93 100644
--- a/openbox/frame.c
+++ b/openbox/frame.c
@@ -1343,13 +1343,13 @@ void frame_client_gravity(ObFrame *self, gint *x, gint *y, gint w, gint h)
case SouthEastGravity:
case EastGravity:
/* the right side of the client will be the right side of the frame */
- *x -= self->size.right + self->size.left;
+ *x -= self->size.right + self->size.left - self->client->border_width*2;
break;
case ForgetGravity:
case StaticGravity:
/* the client's position won't move */
- *x -= self->size.left;
+ *x -= self->size.left - self->client->border_width;
break;
}
@@ -1372,13 +1372,13 @@ void frame_client_gravity(ObFrame *self, gint *x, gint *y, gint w, gint h)
case SouthEastGravity:
case SouthGravity:
/* the bottom of the client will be the bottom of the frame */
- *y -= self->size.bottom + self->size.top;
+ *y -= self->size.bottom + self->size.top - self->client->border_width*2;
break;
case ForgetGravity:
case StaticGravity:
/* the client's position won't move */
- *y -= self->size.top;
+ *y -= self->size.top - self->client->border_width;
break;
}
}
@@ -1402,12 +1402,12 @@ void frame_frame_gravity(ObFrame *self, gint *x, gint *y, gint w, gint h)
case EastGravity:
case SouthEastGravity:
/* the right side of the client will be the right side of the frame */
- *x += self->size.right + self->size.left;
+ *x += self->size.right + self->size.left - self->client->border_width*2;
break;
case StaticGravity:
case ForgetGravity:
/* the client's position won't move */
- *x += self->size.left;
+ *x += self->size.left - self->client->border_width;
break;
}
@@ -1428,12 +1428,12 @@ void frame_frame_gravity(ObFrame *self, gint *x, gint *y, gint w, gint h)
case SouthGravity:
case SouthEastGravity:
/* the bottom of the client will be the bottom of the frame */
- *y += self->size.bottom + self->size.top;
+ *y += self->size.bottom + self->size.top - self->client->border_width*2;
break;
case StaticGravity:
case ForgetGravity:
/* the client's position won't move */
- *y += self->size.top;
+ *y += self->size.top - self->client->border_width;
break;
}
}