[mutter] wayland: Fix subsurface place_above/below type cast error
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland: Fix subsurface place_above/below type cast error
- Date: Thu, 16 Jul 2015 03:47:51 +0000 (UTC)
commit 208da2316d956e8b658000c25792c5dca2cb1727
Author: Jonas Ådahl <jadahl gmail com>
Date: Thu Mar 5 12:15:51 2015 +0800
wayland: Fix subsurface place_above/below type cast error
A MetaWaylandSurface was casted into a ClutterActor, but it should have
been the MetaSurfaceActor.
Move out parent_actor and surface_actor out of the loop while at it
since they won't change when iterating.
https://bugzilla.gnome.org/show_bug.cgi?id=745655
src/wayland/meta-wayland-surface.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index b116bad..fe0daff 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -430,11 +430,15 @@ parent_surface_state_applied (gpointer data, gpointer user_data)
if (surface->sub.pending_placement_ops)
{
GSList *it;
+ MetaWaylandSurface *parent = surface->sub.parent;
+ ClutterActor *parent_actor =
+ clutter_actor_get_parent (CLUTTER_ACTOR (parent->surface_actor));
+ ClutterActor *surface_actor =
+ surface_actor = CLUTTER_ACTOR (surface->surface_actor);
+
for (it = surface->sub.pending_placement_ops; it; it = it->next)
{
MetaWaylandSubsurfacePlacementOp *op = it->data;
- ClutterActor *surface_actor;
- ClutterActor *parent_actor;
ClutterActor *sibling_actor;
if (!op->sibling)
@@ -443,8 +447,6 @@ parent_surface_state_applied (gpointer data, gpointer user_data)
continue;
}
- surface_actor = CLUTTER_ACTOR (surface->surface_actor);
- parent_actor = clutter_actor_get_parent (CLUTTER_ACTOR (surface->sub.parent));
sibling_actor = CLUTTER_ACTOR (op->sibling->surface_actor);
switch (op->placement)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]