all repos — openbox @ be7c0d426a9c764d5c0eb16abeea470ddd1bd48a

openbox fork - make it a bit more like ryudo

use the frame size not the client size when figuring out if stuff fits on the screen
Dana Jansens danakj@orodu.net
commit

be7c0d426a9c764d5c0eb16abeea470ddd1bd48a

parent

b4b0c6257c15613f32736ee44f329198ac823c47

2 files changed, 12 insertions(+), 3 deletions(-)

jump to
M openbox/client.copenbox/client.c

@@ -494,7 +494,8 @@ {

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);
M openbox/event.copenbox/event.c

@@ -780,7 +780,11 @@

{ 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 @@

{ 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)