After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 575740 - [clutter] places slot background over cards from overlapping slots
[clutter] places slot background over cards from overlapping slots
Status: RESOLVED OBSOLETE
Product: aisleriot
Classification: Other
Component: general
pre-3.0
Other All
: High normal
: ---
Assigned To: aisleriot-maint
aisleriot-maint
[clutter]
Depends on:
Blocks: 611832
 
 
Reported: 2009-03-17 19:29 UTC by Vlad Volodin
Modified: 2014-12-07 19:11 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Vlad Volodin 2009-03-17 19:29:27 UTC
Please describe the problem:
Some solitaires (ex. Thirteen, Escalator) don't move empty spaces to backward. In this case the solitaire works fine, but the picture isn't correct.

Steps to reproduce:
1. Make moves, where cards should disappear, but the view of empty space must be left (ex. Klondike isn't good example, because it doesn't have empty spaces after cards)

Actual results:
http://img18.imageshack.us/img18/4686/29482420.png

Expected results:
http://img201.imageshack.us/img201/2805/73488802.png

Does this happen every time?
Yes

Other information:
This happen only with Clutter version of solitaire:
Comment 1 Vlad Volodin 2009-03-17 19:34:27 UTC
I think it is related to the way of hiding the cards:
1. If card's Actor is redrawn (to empty picture), it isn't placed to backward.
2. If there are two Actors (Card and Empty), they are having the same order in Z-Axis. When card's Actor is erased, the Empty actor is left.
In the second case empty actors should be drawn first, and card next.

I'm not still sure about cause of the problem, because I don't understand Aisleriot's sources well.
Comment 2 Jason Clinton 2009-09-21 15:50:20 UTC
This should be a trivial fix by simply pushing any rendering of an empty space to the bottom of the z-axis. This is a single line of code. I will look at it.
Comment 3 Jason Clinton 2009-09-27 04:31:59 UTC
commit decad2f0d9acc4637c79e2b4f04dff98cdc41166
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)

diff --git a/aisleriot/board.c b/aisleriot/board.c
index af5119e..24a6c95 100644
--- a/aisleriot/board.c
+++ b/aisleriot/board.c
@@ -985,6 +985,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);
   }
@@ -1288,7 +1297,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);
   }

commit 7d6d61c88cd4ffbd430116cf9df84d77e508e2b4
Author: Jason D. Clinton <me@jasonclinton.com>
Date:   Sat Sep 26 21:26:57 2009 -0500

    aisleriot: partial fix for z-order of empty slots; handles drag case (#575740)

diff --git a/aisleriot/board.c b/aisleriot/board.c
index 02600ed..bf44528 100644
--- a/aisleriot/board.c
+++ b/aisleriot/board.c
@@ -1268,6 +1268,11 @@ drag_begin (AisleriotBoard *board)
   clutter_container_add (CLUTTER_CONTAINER (stage),
                          priv->moving_cards_group, NULL);
 
+  if (hslot->cards->len == 0) {
+    clutter_actor_lower_bottom (hslot->slot_renderer);
+    clutter_actor_lower_bottom (priv->baize_actor);
+  }
+
   set_cursor (board, CURSOR_CLOSED);
 }
 
@@ -1292,6 +1297,9 @@ drag_end (AisleriotBoard *board,
                                    priv->moving_cards_origin_slot,
                                    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);
+    clutter_actor_raise_top (animation_layer);
   }
 
   priv->click_status = STATUS_NONE;
Comment 4 Christian Persch 2009-11-16 19:44:31 UTC
Reopening; this isn't completely fixed.

This is still visible in e.g. elevator, *while* the card flipping animation is running.
Comment 5 Christian Persch 2009-11-17 15:07:01 UTC
Also, when you clear more that just the lowest row of cards, you see that the slot backgrounds are now stacked in the wrong order: the lowest row is below the 2nd-lowest row, but it should be above it.
Comment 6 Christian Persch 2011-04-25 12:05:06 UTC
Mass-moving only open aisleriot bugs to the new product. Search for "aisleriot-mass-move" to filter them.