static void set_theme_statics(ObFrame *self);
static void free_theme_statics(ObFrame *self);
static gboolean frame_animate_iconify(gpointer self);
+static void frame_adjust_shape(ObFrame *self);
static void frame_adjust_cursors(ObFrame *self);
static void frame_get_offscreen_buffer(ObFrame *self);
static void frame_free_offscreen_buffer(ObFrame *self);
ShapeBounding, 0, 0, xrect, num,
ShapeUnion, Unsorted);
}
-
- if (self->pixmap)
- XShapeCombineShape(ob_display, self->pixmap, ShapeBounding,
- 0, 0, self->window, ShapeBounding, ShapeSet);
-
#endif
}
self->cbwidth_l + (!self->max_horz ? self->bwidth : 0),
self->cbwidth_t + self->bwidth,
self->cbwidth_r + (!self->max_horz ? self->bwidth : 0),
- self->cbwidth_b + (!self->max_horz || !self->max_vert ? 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;
frame_client_gravity. */
self->area.x = self->client->area.x;
self->area.y = self->client->area.y;
- frame_client_gravity(self, &self->area.x, &self->area.y,
- self->client->area.width,
- self->client->area.height);
+ frame_client_gravity(self, &self->area.x, &self->area.y);
}
if (!fake) {
framerender_frame(self);
frame_adjust_shape(self);
- /* the offscreen buffer is invalid when the window is resized */
- if (self->visible)
- frame_get_offscreen_buffer(self);
+ /* the offscreen buffer's shape needs to match */
+ frame_get_offscreen_buffer(self);
}
if (!STRUT_EQUAL(self->size, oldsize)) {
/* reparent the client to the frame */
XReparentWindow(ob_display, self->client->window, self->window, 0, 0);
+ /* enable the offscreen composite buffer for the client window */
+ composite_enable_for_window(self->client->window);
+
/*
When reparenting the client window, it is usually not mapped yet, since
this occurs from a MapRequest. However, in the case where Openbox is
return OB_FRAME_CONTEXT_NONE;
}
-void frame_client_gravity(ObFrame *self, gint *x, gint *y, gint w, gint h)
+void frame_client_gravity(ObFrame *self, gint *x, gint *y)
{
/* horizontal */
switch (self->client->gravity) {
}
}
-void frame_frame_gravity(ObFrame *self, gint *x, gint *y, gint w, gint h)
+void frame_frame_gravity(ObFrame *self, gint *x, gint *y)
{
/* horizontal */
switch (self->client->gravity) {
{
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);
+ frame_client_gravity(self, &r->x, &r->y);
}
static void flash_done(gpointer data)
frame_free_offscreen_buffer(self);
if (self->visible || frame_iconify_animating(self)) {
- self->pixmap = composite_get_window_pixmap(self->window);
+ self->pixmap = composite_get_window_pixmap(self->client->window);
+
+#ifdef SHAPE
+ /* shape the offscreen buffer to match the window */
+ XShapeCombineShape(ob_display, self->pixmap, ShapeBounding,
+ 0, 0, self->client->window,
+ ShapeBounding, ShapeSet);
+#endif
+
/*
self->picture = composite_create_picture(self->window,
wattrib.visual,