From be7c0d426a9c764d5c0eb16abeea470ddd1bd48a Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 2 Aug 2003 18:09:46 +0000 Subject: [PATCH] use the frame size not the client size when figuring out if stuff fits on the screen --- openbox/client.c | 3 ++- openbox/event.c | 12 ++++++++++-- 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) -- 2.39.2