From be7c0d426a9c764d5c0eb16abeea470ddd1bd48a Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 2 Aug 2003 18:09:46 +0000 Subject: use the frame size not the client size when figuring out if stuff fits on the screen --- openbox/event.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'openbox/event.c') 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) -- cgit v1.2.3