use the frame size not the client size when figuring out if stuff fits on the screen

This commit is contained in:
Dana Jansens 2003-08-02 18:09:46 +00:00
parent b4b0c6257c
commit be7c0d426a
2 changed files with 12 additions and 3 deletions

View file

@ -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);

View file

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