always have the offscreen buffer's shape matched to the window's
This commit is contained in:
parent
a138a9a30e
commit
7d3e3ff6df
1 changed files with 12 additions and 11 deletions
|
@ -288,12 +288,6 @@ void frame_adjust_shape(ObFrame *self)
|
||||||
self->client->window,
|
self->client->window,
|
||||||
ShapeBounding, ShapeSet);
|
ShapeBounding, ShapeSet);
|
||||||
|
|
||||||
/* shape the offscreen buffer to match the window */
|
|
||||||
if (self->pixmap)
|
|
||||||
XShapeCombineShape(ob_display, self->pixmap, ShapeBounding,
|
|
||||||
0, 0, self->client->window,
|
|
||||||
ShapeBounding, ShapeSet);
|
|
||||||
|
|
||||||
num = 0;
|
num = 0;
|
||||||
if (self->decorations & OB_FRAME_DECOR_TITLEBAR) {
|
if (self->decorations & OB_FRAME_DECOR_TITLEBAR) {
|
||||||
xrect[0].x = 0;
|
xrect[0].x = 0;
|
||||||
|
@ -318,8 +312,10 @@ void frame_adjust_shape(ObFrame *self)
|
||||||
ShapeBounding, 0, 0, xrect, num,
|
ShapeBounding, 0, 0, xrect, num,
|
||||||
ShapeUnion, Unsorted);
|
ShapeUnion, Unsorted);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* the offscreen buffer's shape needs to match */
|
||||||
|
frame_get_offscreen_buffer(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
void frame_adjust_area(ObFrame *self, gboolean moved,
|
void frame_adjust_area(ObFrame *self, gboolean moved,
|
||||||
|
@ -790,11 +786,8 @@ void frame_adjust_area(ObFrame *self, gboolean moved,
|
||||||
if (resized) {
|
if (resized) {
|
||||||
self->need_render = TRUE;
|
self->need_render = TRUE;
|
||||||
framerender_frame(self);
|
framerender_frame(self);
|
||||||
|
/* this also updates the offscreen buffer */
|
||||||
frame_adjust_shape(self);
|
frame_adjust_shape(self);
|
||||||
|
|
||||||
/* the offscreen buffer is invalid when the window is resized */
|
|
||||||
if (self->visible)
|
|
||||||
frame_get_offscreen_buffer(self);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!STRUT_EQUAL(self->size, oldsize)) {
|
if (!STRUT_EQUAL(self->size, oldsize)) {
|
||||||
|
@ -1760,6 +1753,14 @@ static void frame_get_offscreen_buffer(ObFrame *self)
|
||||||
|
|
||||||
if (self->visible || frame_iconify_animating(self)) {
|
if (self->visible || frame_iconify_animating(self)) {
|
||||||
self->pixmap = composite_get_window_pixmap(self->client->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,
|
self->picture = composite_create_picture(self->window,
|
||||||
wattrib.visual,
|
wattrib.visual,
|
||||||
|
|
Loading…
Reference in a new issue