about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--freecell.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/freecell.c b/freecell.c
index f6562b8..da8729d 100644
--- a/freecell.c
+++ b/freecell.c
@@ -275,18 +275,18 @@ static bool mouseButtonDown(SDL_MouseButtonEvent button) {
 }
 
 static bool mouseButtonUp(SDL_MouseButtonEvent button) {
+	struct SDL_Point point = { button.x, button.y };
+
 	if (button.button == SDL_BUTTON_RIGHT) {
 		if (!reveal.len) return false;
 		reveal.len = 0;
 		return true;
 	}
 
-	struct SDL_Point point = { button.x, button.y };
-	struct Item *item = listFind(&layout.main, &point);
-
 	if (button.clicks % 2 == 0) {
 		Card card = layout.dragItem.card;
 		if (!card) {
+			struct Item *item = listFind(&layout.main, &point);
 			if (!item) return false;
 			card = item->card;
 		}
@@ -308,6 +308,7 @@ static bool mouseButtonUp(SDL_MouseButtonEvent button) {
 		return true;
 	}
 
+	struct Item *item = listFind(&layout.main, &point);
 	if (!item) return false;
 	if (!gameAvail(item->card)) return false;
 	layout.dragItem = *item;
commit/bundle/Vim-Tomorrow-Theme?id=61c25fd7a965a51e0c746e0132974d918f852443&follow=1'>Update Vim-Tomorrow-ThemeJune McEnroe 2012-02-01Add vim-markdownJune McEnroe 2012-02-01Add tabular.vimJune McEnroe 2012-02-01Update Vim-Tomorrow-ThemeJune McEnroe PS. Chris Kempson is a jerk. 2012-01-30Disable menu bar in GVimJune McEnroe 2012-01-30Set shiftwidth to 4 for LuaJune McEnroe 2012-01-29Don't show Syntastic errors automaticallyJune McEnroe 2012-01-28Update to Quicktask 1.1June McEnroe 2012-01-22Use space-test branch of quicktaskJune McEnroe 2012-01-22Enable syntax-based foldingJune McEnroe 2012-01-22Update quicktaskJune McEnroe 2012-01-22Revert "Add AutoClose"June McEnroe This reverts commit 39cfdd62ba82f93f68a2b5fa7b5771303d8b9dee. This fixes the delay when leaving insert mode 2012-01-22Revert "Disable powerline for now"June McEnroe This reverts commit fa48f5965c57272e616721d92475cd2f1e35f667. 2012-01-22Revert "Add VCS repo directories to wildignore"June McEnroe This reverts commit 41cb1db33ba7b64d8af63bf55bb82f7e8a617518. This fixes not being able to commit with vim-fugitive 2012-01-22Disable powerline for nowJune McEnroe 2012-01-22Update some pluginsJune McEnroe 2012-01-22Add VCS repo directories to wildignoreJune McEnroe 2012-01-22Map ,e and ,b to CtrlP file and buffer respectivelyJune McEnroe 2012-01-22Add vim-spaceJune McEnroe 2012-01-22Add AutoCloseJune McEnroe 2012-01-22Add binding for GundoJune McEnroe 2012-01-22Add GundoJune McEnroe 2012-01-22Add Jellybeans colorschemeJune McEnroe 2012-01-22Add syntasticJune McEnroe 2012-01-21Add PowerlineJune McEnroe 2012-01-21Add quicktaskJune McEnroe 2012-01-15Moved comments out of mapsJune McEnroe 2012-01-14Disable scrollbarsJune McEnroe