]> Dogcows Code - chaz/openbox/commitdiff
use the frame size not the client size when figuring out if stuff fits on the screen
authorDana Jansens <danakj@orodu.net>
Sat, 2 Aug 2003 18:09:46 +0000 (18:09 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 2 Aug 2003 18:09:46 +0000 (18:09 +0000)
openbox/client.c
openbox/event.c

index c57c66e84571ec5e4ec90813ffb6e3a150722924..e8b5416c4baa5a430184044c2e34005e84113754 100644 (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);
index a7ed67fdab9664cddc32e8973e0b19666f3b0396..7db6945dc7d11bd4cbe3efbb16981e01751ad6f1 100644 (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)
This page took 0.029996 seconds and 4 git commands to generate.