some cleanups, got rid of the border shit
authorDana Jansens <danakj@orodu.net>
Tue, 27 May 2003 21:44:21 +0000 (21:44 +0000)
committerDana Jansens <danakj@orodu.net>
Tue, 27 May 2003 21:44:21 +0000 (21:44 +0000)
openbox/frame.c
openbox/frame.h

index 105420cc39e32ad16f721859e68559aad75e2964..886bacac7612e951c0709474cc4b1f83d7268a31 100644 (file)
@@ -9,11 +9,6 @@
 #define ELEMENT_EVENTMASK (ButtonPressMask | ButtonReleaseMask | \
                            ButtonMotionMask | ExposureMask)
 
-/* XXX temp */
-static int theme_bwidth = 3;
-static int theme_cbwidth = 3;
-static int theme_title_height = 8;
-
 void frame_startup()
 {
 }
@@ -553,34 +548,24 @@ void frame_adjust_area(Frame *self, gboolean moved, gboolean resized)
                 break;
             }
         }
-printf("frame extends by %d, %d, %d, %d\n", le, te, le, be);
+g_print("frame extends by %d, %d, %d, %d\n", le, te, le, be);
     if (resized) {
+        /*
         if (self->client->decorations & Decor_Border) {
             self->bwidth = theme_bwidth;
             self->cbwidth = theme_cbwidth;
         } else {
             self->bwidth = self->cbwidth = 0;
         }
-        STRUT_SET(self->size, self->cbwidth + le, 
-                  self->cbwidth + te, self->cbwidth + re, self->cbwidth + be);
-
-        self->width = self->client->area.width + self->cbwidth * 2 + re + le;
-        g_assert(self->width > 0);
-    }
-    if (resized) {
-        STRUT_SET(self->size,
-                  self->cbwidth + le,
-                  self->cbwidth + te,
-                  self->cbwidth + re,
-                  self->cbwidth + be);
-
+        */
+        STRUT_SET(self->size, le, te, re, be);
     }
 
     if (resized) {
         /* move and resize the plate */
         XMoveResizeWindow(ob_display, self->plate,
-                          self->size.left - self->cbwidth,
-                          self->size.top - self->cbwidth,
+                          self->size.left,
+                          self->size.top,
                           self->client->area.width,
                           self->client->area.height);
 
@@ -592,7 +577,7 @@ printf("frame extends by %d, %d, %d, %d\n", le, te, le, be);
     RECT_SET_SIZE(self->area,
                  self->client->area.width +
                  self->size.left + self->size.right,
-                 (self->client->shaded ? theme_title_height + self->bwidth*2:
+                 (self->client->shaded ? self->size.top : 
                    self->client->area.height +
                    self->size.top + self->size.bottom));
 
@@ -681,7 +666,7 @@ printf("frame extends by %d, %d, %d, %d\n", le, te, le, be);
                     break;
 
                     case Decor_Bottom:
-                    x = cr->width/2 + self->size.left - area.x
+)                    x = cr->width/2 + self->size.left - area.x
                       - area.width/2;
                     y = self->size.top + cr->height
                       + area.y;
@@ -706,8 +691,8 @@ printf("frame extends by %d, %d, %d, %d\n", le, te, le, be);
        shading can change without being moved or resized */
     RrSurfaceSetArea(self->surface,
                       self->area.x, self->area.y,
-                      self->width,
-                      self->area.height - self->bwidth * 2);
+                      self->area.width,
+                      self->area.height);
 
     if (resized) {
         framerender_frame(self);
index 0966faa381e08ae36a6c31b04aff46cacd87f336..928262d1137f05389dc3fa245eed7da8e6109c59 100644 (file)
@@ -76,11 +76,6 @@ typedef struct Frame {
     int framedecors;
     struct FrameDecor *framedecor;
 
-    int width;         /* width of client + borders */
-    int height;         /* height of client + borders */
-    int bwidth;        /* border width */
-    int cbwidth;       /* client border width */
-
     gboolean max_press;
     gboolean close_press;
     gboolean desk_press;