Set the input mask on the composited windows to include

ShapeNotifyMask. Remove the call to resize_win in process_shape
because it is redundant.
This commit is contained in:
Neil Roberts 2008-09-25 13:30:34 +01:00
parent c58ade6600
commit 43e3fbc518

View File

@ -321,6 +321,12 @@ meta_comp_window_constructed (GObject *object)
meta_comp_window_get_window_type (self); meta_comp_window_get_window_type (self);
#ifdef HAVE_SHAPE
/* Listen for ShapeNotify events on the window */
if (meta_display_has_shape (display))
XShapeSelectInput (xdisplay, xwindow, ShapeNotifyMask);
#endif
priv->shaped = is_shaped (display, xwindow); priv->shaped = is_shaped (display, xwindow);
if (priv->attrs.class == InputOnly) if (priv->attrs.class == InputOnly)
@ -1445,16 +1451,7 @@ process_shape (MetaCompositorClutter *compositor,
if (event->kind == ShapeBounding) if (event->kind == ShapeBounding)
{ {
if (!event->shaped && priv->shaped) priv->shaped = event->shaped;
priv->shaped = FALSE;
resize_win (cw, priv->attrs.x, priv->attrs.y,
event->width + event->x, event->height + event->y,
priv->attrs.border_width, priv->attrs.override_redirect);
if (event->shaped && !priv->shaped)
priv->shaped = TRUE;
update_shape (compositor, cw); update_shape (compositor, cw);
} }
} }