gnome-games r7179 - trunk/aisleriot



Author: chpe
Date: Sun Jan 13 22:07:50 2008
New Revision: 7179
URL: http://svn.gnome.org/viewvc/gnome-games?rev=7179&view=rev

Log:
When moving to the first slot, focus the first exposed card, not the
bottommost card.


Modified:
   trunk/aisleriot/board.c

Modified: trunk/aisleriot/board.c
==============================================================================
--- trunk/aisleriot/board.c	(original)
+++ trunk/aisleriot/board.c	Sun Jan 13 22:07:50 2008
@@ -1837,7 +1837,11 @@
     new_focus_card_id = ((int) new_focus_slot->cards->len) - 1;
   } else {
     new_focus_slot = (Slot *) slots->pdata[0];
-    new_focus_card_id = new_focus_slot->cards->len > 0 ? 0 : -1;
+    if (new_focus_slot->cards->len > 0) {
+      new_focus_card_id = ((int) new_focus_slot->cards->len) - ((int) new_focus_slot->exposed);
+    } else {
+      new_focus_card_id = -1;
+    }
   }
 
   g_assert (new_focus_slot != NULL);



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