[gnome-mines] Fix broken rollovers #54



commit 43e9641a02f1edc2da79cfa8fb01f6f67ebb8215
Author: Miguel Sánchez Palomino <miguelsanchez1703 gmail com>
Date:   Mon Aug 17 08:08:34 2020 +0000

    Fix broken rollovers #54

 src/minefield-view.vala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/minefield-view.vala b/src/minefield-view.vala
index d399b95..649c969 100644
--- a/src/minefield-view.vala
+++ b/src/minefield-view.vala
@@ -517,7 +517,7 @@ public class MinefieldView : Gtk.Grid
             return true;
         }
 
-        keyboard_cursor.position = { (int) (x % _minefield.width), (int) (y % _minefield.height)};
+        keyboard_cursor.position = {(int) (x == -1 ? _minefield.width-1 : x%_minefield.width), (int) (y == 
-1 ? _minefield.height-1 : y%_minefield.height)};
 
         mines[keyboard_cursor.x,keyboard_cursor.y].add_class ("cursor");
         if (selected.is_set)


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