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;
self->cbwidth_b + (!self->max_horz || !self->max_vert ? self->bwidth : 0));
if (self->decorations & OB_FRAME_DECOR_TITLEBAR)
- self->size.top += ob_rr_theme->title_height + ob_rr_theme->tswidth;
+ self->size.top += ob_rr_theme->title_height + self->bwidth;
if (self->decorations & OB_FRAME_DECOR_HANDLE &&
ob_rr_theme->handle_height > 0)
{
XMapWindow(ob_display, self->titletopleft);
XMapWindow(ob_display, self->titletopright);
- if (self->decorations & OB_FRAME_DECOR_TITLEBAR &&
- ob_rr_theme->tswidth)
- {
+ if (self->decorations & OB_FRAME_DECOR_TITLEBAR) {
XMoveResizeWindow(ob_display, self->titlebottom,
self->bwidth,
ob_rr_theme->title_height + self->bwidth,
self->width,
- ob_rr_theme->tswidth);
+ self->bwidth);
XMapWindow(ob_display, self->titlebottom);
} else
}
}
+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;
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;
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;
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);
}