[gnome-games/gnome-2-28] aisleriot: resolve z-order for empty slots; handles selection case (#575740)



commit 4464cedc43fef13e5123b644ee3238510a749e9c
Author: Jason D. Clinton <me jasonclinton com>
Date:   Sat Sep 26 23:28:57 2009 -0500

    aisleriot: resolve z-order for empty slots; handles selection case (#575740)

 aisleriot/board.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/aisleriot/board.c b/aisleriot/board.c
index bf44528..2eb94d8 100644
--- a/aisleriot/board.c
+++ b/aisleriot/board.c
@@ -995,6 +995,15 @@ check_animations_cb (gpointer user_data)
        animations->len, (const AisleriotAnimStart *) animations->data,
        n_unexposed_animated_cards);
 
+    if (slot->cards->len == 0) {
+      clutter_actor_lower_bottom (slot->slot_renderer);
+      clutter_actor_lower_bottom (priv->baize_actor);
+    } else {
+      clutter_actor_raise_top (slot->slot_renderer);
+      ClutterActor *animation_layer = CLUTTER_ACTOR(aisleriot_slot_renderer_get_animation_layer(AISLERIOT_SLOT_RENDERER(slot->slot_renderer)));
+      clutter_actor_raise_top (animation_layer);
+    }
+
     /* Set the old cards back to the new cards */
     aisleriot_game_reset_old_cards (slot);
   }
@@ -1298,7 +1307,7 @@ drag_end (AisleriotBoard *board,
                                    priv->moving_cards->data,
                                    priv->moving_cards->len);
     clutter_actor_raise_top (priv->moving_cards_origin_slot->slot_renderer);
-    ClutterActor *animation_layer = aisleriot_slot_renderer_get_animation_layer(priv->moving_cards_origin_slot->slot_renderer);
+    ClutterActor *animation_layer = CLUTTER_ACTOR(aisleriot_slot_renderer_get_animation_layer(AISLERIOT_SLOT_RENDERER(priv->moving_cards_origin_slot->slot_renderer)));
     clutter_actor_raise_top (animation_layer);
   }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]