[gnome-games] lightsoff: fix misinterpreted clicks when mouse moves



commit 1fe994060286aa4f9d179ae90f7c5b54be0c9c3d
Author: Tim Horton <hortont424 gmail com>
Date:   Sat May 8 00:26:49 2010 -0400

    lightsoff: fix misinterpreted clicks when mouse moves
    
    Use location where mouse is clicked, not released, to determine what light to flip. Fixes BGO 614698

 lightsoff/src/Board.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/lightsoff/src/Board.js b/lightsoff/src/Board.js
index 30526e6..2f02ab0 100644
--- a/lightsoff/src/Board.js
+++ b/lightsoff/src/Board.js
@@ -95,7 +95,7 @@ BoardView = new GType({
 					var l = new Light.LightView();
 					var loc = position_for_light(x, y);
 					l.set_position(loc.x, loc.y);
-					l.signal.button_release_event.connect(light_clicked, {"x":x, "y":y});
+					l.signal.button_press_event.connect(light_clicked, {"x":x, "y":y});
 					
 					lights[x][y] = l;
 					self.add_actor(l);
@@ -113,7 +113,7 @@ BoardView = new GType({
 				self.signal.game_won.emit();
 		}
 		
-		// Callback for button_release_event from each light; user_data
+		// Callback for button_press_event from each light; user_data
 		// is an object containing the coordinates of the clicked light.
 		var light_clicked = function(light, event, coords)
 		{



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