summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-08-02 18:09:46 +0000
committerDana Jansens <danakj@orodu.net>2003-08-02 18:09:46 +0000
commitbe7c0d426a9c764d5c0eb16abeea470ddd1bd48a (patch)
tree21c7c00a8095235e9c3bfa59c1aececf0085afed
parentb4b0c6257c15613f32736ee44f329198ac823c47 (diff)
use the frame size not the client size when figuring out if stuff fits on the screen
-rw-r--r--openbox/client.c3
-rw-r--r--openbox/event.c12
2 files changed, 12 insertions, 3 deletions
diff --git a/openbox/client.c b/openbox/client.c
index c57c66e8..e8b5416c 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -494,7 +494,8 @@ void client_move_onscreen(ObClient *self, gboolean rude)
int x = self->area.x;
int y = self->area.y;
if (client_find_onscreen(self, &x, &y,
- self->area.width, self->area.height, rude)) {
+ self->frame->area.width,
+ self->frame->area.height, rude)) {
client_configure(self, OB_CORNER_TOPLEFT, x, y,
self->area.width, self->area.height,
TRUE, TRUE);
diff --git a/openbox/event.c b/openbox/event.c
index a7ed67fd..7db6945d 100644
--- a/openbox/event.c
+++ b/openbox/event.c
@@ -780,7 +780,11 @@ static void event_handle_client(ObClient *client, XEvent *e)
{
int newx = x;
int newy = y;
- client_find_onscreen(client, &newx, &newy, w, h, TRUE);
+ int fw = w +
+ client->frame->size.left + client->frame->size.right;
+ int fh = h +
+ client->frame->size.top + client->frame->size.bottom;
+ client_find_onscreen(client, &newx, &newy, fw, fh, TRUE);
if (e->xconfigurerequest.value_mask & CWX)
x = newx;
if (e->xconfigurerequest.value_mask & CWY)
@@ -979,7 +983,11 @@ static void event_handle_client(ObClient *client, XEvent *e)
{
int newx = x;
int newy = y;
- client_find_onscreen(client, &newx, &newy, w, h, TRUE);
+ int fw = w +
+ client->frame->size.left + client->frame->size.right;
+ int fh = h +
+ client->frame->size.top + client->frame->size.bottom;
+ client_find_onscreen(client, &newx, &newy, fw, fh, TRUE);
if (e->xclient.data.l[0] & 1 << 8)
x = newx;
if (e->xclient.data.l[0] & 1 << 9)