mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
window-actor: Remove custom region destruction methods with g_clear_pointer
https://bugzilla.gnome.org/show_bug.cgi?id=679901
This commit is contained in:
parent
079dd60e3d
commit
53534b4ded
@ -151,10 +151,6 @@ static gboolean meta_window_actor_get_paint_volume (ClutterActor *actor,
|
|||||||
static void meta_window_actor_detach (MetaWindowActor *self);
|
static void meta_window_actor_detach (MetaWindowActor *self);
|
||||||
static gboolean meta_window_actor_has_shadow (MetaWindowActor *self);
|
static gboolean meta_window_actor_has_shadow (MetaWindowActor *self);
|
||||||
|
|
||||||
static void meta_window_actor_clear_shape_region (MetaWindowActor *self);
|
|
||||||
static void meta_window_actor_clear_bounding_region (MetaWindowActor *self);
|
|
||||||
static void meta_window_actor_clear_shadow_clip (MetaWindowActor *self);
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (MetaWindowActor, meta_window_actor, CLUTTER_TYPE_GROUP);
|
G_DEFINE_TYPE (MetaWindowActor, meta_window_actor, CLUTTER_TYPE_GROUP);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -384,9 +380,9 @@ meta_window_actor_dispose (GObject *object)
|
|||||||
|
|
||||||
meta_window_actor_detach (self);
|
meta_window_actor_detach (self);
|
||||||
|
|
||||||
meta_window_actor_clear_shape_region (self);
|
g_clear_pointer (&priv->shape_region, cairo_region_destroy);
|
||||||
meta_window_actor_clear_bounding_region (self);
|
g_clear_pointer (&priv->bounding_region, cairo_region_destroy);
|
||||||
meta_window_actor_clear_shadow_clip (self);
|
g_clear_pointer (&priv->shadow_clip, cairo_region_destroy);
|
||||||
|
|
||||||
g_clear_pointer (&priv->shadow_class, g_free);
|
g_clear_pointer (&priv->shadow_class, g_free);
|
||||||
g_clear_pointer (&priv->focused_shadow, meta_shadow_unref);
|
g_clear_pointer (&priv->focused_shadow, meta_shadow_unref);
|
||||||
@ -1532,42 +1528,6 @@ meta_window_actor_unmapped (MetaWindowActor *self)
|
|||||||
priv->needs_pixmap = FALSE;
|
priv->needs_pixmap = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
meta_window_actor_clear_shape_region (MetaWindowActor *self)
|
|
||||||
{
|
|
||||||
MetaWindowActorPrivate *priv = self->priv;
|
|
||||||
|
|
||||||
if (priv->shape_region)
|
|
||||||
{
|
|
||||||
cairo_region_destroy (priv->shape_region);
|
|
||||||
priv->shape_region = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
meta_window_actor_clear_bounding_region (MetaWindowActor *self)
|
|
||||||
{
|
|
||||||
MetaWindowActorPrivate *priv = self->priv;
|
|
||||||
|
|
||||||
if (priv->bounding_region)
|
|
||||||
{
|
|
||||||
cairo_region_destroy (priv->bounding_region);
|
|
||||||
priv->bounding_region = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
meta_window_actor_clear_shadow_clip (MetaWindowActor *self)
|
|
||||||
{
|
|
||||||
MetaWindowActorPrivate *priv = self->priv;
|
|
||||||
|
|
||||||
if (priv->shadow_clip)
|
|
||||||
{
|
|
||||||
cairo_region_destroy (priv->shadow_clip);
|
|
||||||
priv->shadow_clip = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_window_actor_update_bounding_region_and_borders (MetaWindowActor *self,
|
meta_window_actor_update_bounding_region_and_borders (MetaWindowActor *self,
|
||||||
int width,
|
int width,
|
||||||
@ -1608,7 +1568,7 @@ meta_window_actor_update_bounding_region_and_borders (MetaWindowActor *self,
|
|||||||
|
|
||||||
priv->last_borders = borders;
|
priv->last_borders = borders;
|
||||||
|
|
||||||
meta_window_actor_clear_bounding_region (self);
|
g_clear_pointer (&priv->bounding_region, cairo_region_destroy);
|
||||||
|
|
||||||
priv->bounding_region = cairo_region_create_rectangle (&bounding_rectangle);
|
priv->bounding_region = cairo_region_create_rectangle (&bounding_rectangle);
|
||||||
|
|
||||||
@ -1623,7 +1583,7 @@ meta_window_actor_update_shape_region (MetaWindowActor *self,
|
|||||||
{
|
{
|
||||||
MetaWindowActorPrivate *priv = self->priv;
|
MetaWindowActorPrivate *priv = self->priv;
|
||||||
|
|
||||||
meta_window_actor_clear_shape_region (self);
|
g_clear_pointer (&priv->shape_region, cairo_region_destroy);
|
||||||
|
|
||||||
/* region must be non-null */
|
/* region must be non-null */
|
||||||
priv->shape_region = region;
|
priv->shape_region = region;
|
||||||
@ -1752,7 +1712,7 @@ meta_window_actor_set_visible_region_beneath (MetaWindowActor *self,
|
|||||||
|
|
||||||
if (appears_focused ? priv->focused_shadow : priv->unfocused_shadow)
|
if (appears_focused ? priv->focused_shadow : priv->unfocused_shadow)
|
||||||
{
|
{
|
||||||
meta_window_actor_clear_shadow_clip (self);
|
g_clear_pointer (&priv->shadow_clip, cairo_region_destroy);
|
||||||
priv->shadow_clip = cairo_region_copy (beneath_region);
|
priv->shadow_clip = cairo_region_copy (beneath_region);
|
||||||
|
|
||||||
if (clip_shadow_under_window (self))
|
if (clip_shadow_under_window (self))
|
||||||
@ -1777,7 +1737,7 @@ meta_window_actor_reset_visible_regions (MetaWindowActor *self)
|
|||||||
|
|
||||||
meta_shaped_texture_set_clip_region (META_SHAPED_TEXTURE (priv->actor),
|
meta_shaped_texture_set_clip_region (META_SHAPED_TEXTURE (priv->actor),
|
||||||
NULL);
|
NULL);
|
||||||
meta_window_actor_clear_shadow_clip (self);
|
g_clear_pointer (&priv->shadow_clip, cairo_region_destroy);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -2216,7 +2176,7 @@ check_needs_reshape (MetaWindowActor *self)
|
|||||||
client_area.height = priv->window->rect.height;
|
client_area.height = priv->window->rect.height;
|
||||||
|
|
||||||
meta_shaped_texture_set_mask_texture (META_SHAPED_TEXTURE (priv->actor), COGL_INVALID_HANDLE);
|
meta_shaped_texture_set_mask_texture (META_SHAPED_TEXTURE (priv->actor), COGL_INVALID_HANDLE);
|
||||||
meta_window_actor_clear_shape_region (self);
|
g_clear_pointer (&priv->shape_region, cairo_region_destroy);
|
||||||
|
|
||||||
#ifdef HAVE_SHAPE
|
#ifdef HAVE_SHAPE
|
||||||
if (priv->window->has_shape)
|
if (priv->window->has_shape)
|
||||||
|
Loading…
Reference in New Issue
Block a user