diff --git a/src/compositor/mutter-window.c b/src/compositor/mutter-window.c index 5116b3101..f25349483 100644 --- a/src/compositor/mutter-window.c +++ b/src/compositor/mutter-window.c @@ -68,6 +68,7 @@ struct _MutterWindowPrivate guint redecorating : 1; guint needs_damage_all : 1; + guint received_damage : 1; guint needs_pixmap : 1; guint needs_reshape : 1; @@ -337,7 +338,7 @@ mutter_window_constructed (GObject *object) priv->damage = None; else priv->damage = XDamageCreate (xdisplay, xwindow, - XDamageReportRawRectangles); + XDamageReportBoundingBox); format = XRenderFindVisualFormat (xdisplay, priv->attrs.visual); @@ -1652,6 +1653,8 @@ mutter_window_process_damage (MutterWindow *self, MutterWindowPrivate *priv = self->priv; ClutterX11TexturePixmap *texture_x11 = CLUTTER_X11_TEXTURE_PIXMAP (priv->actor); + priv->received_damage = TRUE; + if (is_frozen (self)) { /* The window is frozen due to an effect in progress: we ignore damage @@ -1748,6 +1751,11 @@ mutter_window_update_shape (MutterWindow *self, void mutter_window_pre_paint (MutterWindow *self) { + MutterWindowPrivate *priv = self->priv; + MetaScreen *screen = priv->screen; + MetaDisplay *display = meta_screen_get_display (screen); + Display *xdisplay = meta_display_get_xdisplay (display); + if (is_frozen (self)) { /* The window is frozen due to a pending animation: we'll wait until @@ -1755,6 +1763,12 @@ mutter_window_pre_paint (MutterWindow *self) return; } + if (priv->received_damage) + { + XDamageSubtract (xdisplay, priv->damage, None, None); + priv->received_damage = FALSE; + } + check_needs_reshape (self); check_needs_pixmap (self); }