]> 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 8ce2a16d9bbaa4e194e637704c68b4629304ca7a..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;
@@ -1630,10 +1643,11 @@ void frame_end_iconify_animation(ObFrame *self)
 
     if (!self->visible)
         XUnmapWindow(ob_display, self->window);
-    else
+    else {
         /* Send a ConfigureNotify when the animation is done, this fixes
            KDE's pager showing the window in the wrong place. */
         client_reconfigure(self->client);
+    }
 
     /* we're not animating any more ! */
     self->iconify_animation_going = 0;
@@ -1641,6 +1655,8 @@ void frame_end_iconify_animation(ObFrame *self)
     XMoveResizeWindow(ob_display, self->window,
                       self->area.x, self->area.y,
                       self->area.width, self->area.height);
+    /* we delay re-rendering until after we're done animating */
+    framerender_frame(self);
     XFlush(ob_display);
 }
 
This page took 0.022778 seconds and 4 git commands to generate.