[gnome-tetravex] Do not hardcode mouse buttons.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tetravex] Do not hardcode mouse buttons.
- Date: Sat, 26 Oct 2019 19:19:21 +0000 (UTC)
commit 534a2a2b765ffdc473e43732ce3e7738c89b1a60
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Sat Oct 26 21:18:29 2019 +0200
Do not hardcode mouse buttons.
src/puzzle-view.vala | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/puzzle-view.vala b/src/puzzle-view.vala
index 737209e..7a30f82 100644
--- a/src/puzzle-view.vala
+++ b/src/puzzle-view.vala
@@ -679,7 +679,7 @@ private class PuzzleView : Gtk.DrawingArea
return false;
clear_keyboard_highlight (/* only selection */ false);
- if (event.button == 1 || event.button == 3)
+ if (event.button == Gdk.BUTTON_PRIMARY || event.button == Gdk.BUTTON_SECONDARY)
return main_button_pressed (event);
if (!mouse_use_extra_buttons)
@@ -772,7 +772,8 @@ private class PuzzleView : Gtk.DrawingArea
return false;
clear_keyboard_highlight (/* only selection */ false);
- if ((event.button == 1 || event.button == 3) && selected_tile != null && selection_timeout == 0)
+ if ((event.button == Gdk.BUTTON_PRIMARY || event.button == Gdk.BUTTON_SECONDARY)
+ && selected_tile != null && selection_timeout == 0)
drop_tile (event.x, event.y);
if (selection_timeout != 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]