[iagno] Fix mouse buttons.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [iagno] Fix mouse buttons.
- Date: Thu, 16 Apr 2020 17:09:07 +0000 (UTC)
commit cc04c0776476dbb42944e099c9609283e670b89a
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Thu Apr 16 19:08:00 2020 +0200
Fix mouse buttons.
src/reversi-view.vala | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/src/reversi-view.vala b/src/reversi-view.vala
index dae1875..a14f8bb 100644
--- a/src/reversi-view.vala
+++ b/src/reversi-view.vala
@@ -1076,6 +1076,7 @@ private class ReversiView : Gtk.DrawingArea
// motion_controller.leave.connect (on_mouse_out); // FIXME should work
// 2/10
click_controller = new Gtk.GestureMultiPress (this);
+ click_controller.set_button (/* all buttons */ 0);
click_controller.pressed.connect (on_click);
}
@@ -1220,6 +1221,10 @@ private class ReversiView : Gtk.DrawingArea
if (!game_is_set)
return;
+ uint button = _click_controller.get_current_button ();
+ if (button != Gdk.BUTTON_PRIMARY && button != Gdk.BUTTON_SECONDARY)
+ return;
+
uint8 x;
uint8 y;
if (pointer_is_in_board (event_x, event_y, out x, out y))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]