gnome-games r7189 - trunk/aisleriot



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

Log:
Clicking again on the card with the hidden focus makes the
focus visible.


Modified:
   trunk/aisleriot/board.c

Modified: trunk/aisleriot/board.c
==============================================================================
--- trunk/aisleriot/board.c	(original)
+++ trunk/aisleriot/board.c	Sun Jan 13 22:08:12 2008
@@ -2688,7 +2688,7 @@
   guint button;
   gboolean drag_valid;
   guint state;
-  gboolean is_double_click;
+  gboolean is_double_click, show_focus;
 
   /* NOTE: It's ok to just return instead of chaining up, since the
    * parent class has no class closure for this event.
@@ -2840,7 +2840,14 @@
     priv->click_status = STATUS_NOT_DRAG;
   }
 
-  set_focus (board, hslot, cardid, FALSE);
+  /* If we're already showing focus or just clicked on the
+   * card with the (hidden) focus, show the focus on the
+   * clicked card.
+   */
+  show_focus = priv->show_focus ||
+               (hslot == priv->focus_slot &&
+                cardid == priv->focus_card_id);
+  set_focus (board, hslot, cardid, show_focus);
 
   /* Reveal the card on left click */
   if (priv->click_to_move) {



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