]> Dogcows Code - chaz/openbox/blobdiff - openbox/frame.c
xinerama support like crazy for struts and everything else too. this probably crashes...
[chaz/openbox] / openbox / frame.c
index c30415ddef7f272acf5663685ae76674ac784d76..6aae7a2a15c8d56738ac80df9973b5bff93eff90 100644 (file)
@@ -335,14 +335,18 @@ void frame_adjust_area(ObFrame *self, gboolean moved,
         self->max_horz = self->client->max_horz;
         self->max_vert = self->client->max_vert;
 
-        if (self->decorations & OB_FRAME_DECOR_BORDER) {
+        if (self->decorations & OB_FRAME_DECOR_BORDER ||
+            (self->client->undecorated && config_theme_keepborder))
             self->bwidth = ob_rr_theme->fbwidth;
+        else
+            self->bwidth = 0;
+
+        if (self->decorations & OB_FRAME_DECOR_BORDER) {
             self->cbwidth_l = self->cbwidth_r = ob_rr_theme->cbwidthx;
             self->cbwidth_t = self->cbwidth_b = ob_rr_theme->cbwidthy;
-        } else {
-            self->bwidth = self->cbwidth_l = self->cbwidth_t =
+        } else
+            self->cbwidth_l = self->cbwidth_t =
                 self->cbwidth_r = self->cbwidth_b = 0;
-        }
 
         if (self->max_horz) {
             self->cbwidth_l = self->cbwidth_r = 0;
@@ -1488,6 +1492,13 @@ void frame_frame_gravity(ObFrame *self, gint *x, gint *y, gint w, gint h)
     }
 }
 
+void frame_rect_to_frame(ObFrame *self, Rect *r)
+{
+    r->width += self->size.left + self->size.right;
+    r->height += self->size.top + self->size.bottom;
+    frame_client_gravity(self, &r->x, &r->y, r->width, r->height);
+}
+
 static void flash_done(gpointer data)
 {
     ObFrame *self = data;
@@ -1566,10 +1577,12 @@ static gboolean frame_animate_iconify(gpointer p)
 
     if (self->client->icon_geometry.width == 0) {
         /* there is no icon geometry set so just go straight down */
-        Rect *a = screen_physical_area();
+        Rect *a = screen_physical_area_monitor
+            (screen_find_monitor(&self->area));
         iconx = self->area.x + self->area.width / 2 + 32;
         icony = a->y + a->width;
         iconw = 64;
+        g_free(a);
     } else {
         iconx = self->client->icon_geometry.x;
         icony = self->client->icon_geometry.y;
This page took 0.023594 seconds and 4 git commands to generate.