[gnome-chess] Remove unnecessary check.



commit e6e1d755d396cc261064c29b24992789a6146611
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Thu Apr 16 19:30:01 2020 +0200

    Remove unnecessary check.

 src/chess-view.vala | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/chess-view.vala b/src/chess-view.vala
index 02ff3bc..d722890 100644
--- a/src/chess-view.vala
+++ b/src/chess-view.vala
@@ -278,14 +278,13 @@ public class ChessView : Gtk.DrawingArea
 
     private inline void init_mouse ()
     {
-        click_controller = new Gtk.GestureMultiPress (this);
+        click_controller = new Gtk.GestureMultiPress (this);    // only reacts to Gdk.BUTTON_PRIMARY
         click_controller.pressed.connect (on_click);
     }
 
     private inline void on_click (Gtk.GestureMultiPress _click_controller, int n_press, double event_x, 
double event_y)
     {
-        uint button = _click_controller.get_button ();
-        if (scene.game == null || button != Gdk.BUTTON_PRIMARY || scene.game.should_show_paused_overlay)
+        if (scene.game == null || scene.game.should_show_paused_overlay)
             return;
 
         // If the game is over, disable selection of pieces


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