STRUT_SET(self->size,
self->cbwidth_l + (!self->max_horz ? self->bwidth : 0),
- self->cbwidth_t + self->bwidth,
+ self->cbwidth_t +
+ (!self->max_horz || !self->max_vert ? self->bwidth : 0),
self->cbwidth_r + (!self->max_horz ? self->bwidth : 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 + self->bwidth;
+ else if (self->max_horz && self->max_vert) {
+ /* A maximized and undecorated window needs a border on the
+ top of the window to let the user still undecorate/unmaximize the
+ window via the client menu. */
+ self->size.top += self->bwidth;
+ }
+
if (self->decorations & OB_FRAME_DECOR_HANDLE &&
ob_rr_theme->handle_height > 0)
{
if (self->focused != self->flash_on)
frame_adjust_focus(self, self->focused);
+
+ self->flash_timer = 0;
}
static gboolean flash_timeout(gpointer data)
XMoveResizeWindow(obt_display, self->window, x, y, w, h);
XFlush(obt_display);
- if (time == 0)
- frame_end_iconify_animation(self);
-
return time > 0; /* repeat until we're out of time */
}
-void frame_end_iconify_animation(ObFrame *self)
+void frame_end_iconify_animation(gpointer data)
{
+ ObFrame *self = data;
/* see if there is an animation going */
if (self->iconify_animation_going == 0) return;
/* we're not animating any more ! */
self->iconify_animation_going = 0;
+ self->iconify_animation_timer = 0;
XMoveResizeWindow(obt_display, self->window,
self->area.x, self->area.y,
self->iconify_animation_timer =
g_timeout_add_full(G_PRIORITY_DEFAULT,
FRAME_ANIMATE_ICONIFY_STEP_TIME,
- frame_animate_iconify, self, NULL);
+ frame_animate_iconify, self,
+ frame_end_iconify_animation);
/* do the first step */