[five-or-more/arnaudb/gtk3: 23/24] Revert "Update to GestureClick."
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [five-or-more/arnaudb/gtk3: 23/24] Revert "Update to GestureClick."
- Date: Thu, 22 Oct 2020 15:32:55 +0000 (UTC)
commit f5c0aa8ae2d531a7e50c95f4f22107292a76bcf1
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Thu Oct 22 17:30:41 2020 +0200
Revert "Update to GestureClick."
This reverts commit cd1a0e7429ded7cec3292cfd0d59aaaee6641116.
src/view.vala | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/view.vala b/src/view.vala
index 379a727..21ce61a 100644
--- a/src/view.vala
+++ b/src/view.vala
@@ -51,7 +51,7 @@ private class View : DrawingArea
private uint animation_id;
private EventControllerKey key_controller; // for keeping in memory
- private GestureClick click_controller; // for keeping in memory
+ private GestureMultiPress click_controller; // for keeping in memory
internal const string default_background_color = "rgb(117,144,174)";
private string _background_color = default_background_color;
@@ -168,9 +168,8 @@ private class View : DrawingArea
private void init_keyboard ()
{
- key_controller = new Gtk.EventControllerKey ();
+ key_controller = new Gtk.EventControllerKey (this);
key_controller.key_pressed.connect (on_key_pressed);
- add_controller (key_controller);
}
private inline bool on_key_pressed (Gtk.EventControllerKey _key_controller, uint keyval, uint keycode,
Gdk.ModifierType state)
@@ -294,12 +293,11 @@ private class View : DrawingArea
private void init_mouse ()
{
- click_controller = new GestureClick (); // only reacts to Gdk.BUTTON_PRIMARY
+ click_controller = new GestureMultiPress (this); // only reacts to Gdk.BUTTON_PRIMARY
click_controller.pressed.connect (on_click);
- add_controller (click_controller);
}
- private inline void on_click (GestureClick _click_controller, int n_press, double event_x, double
event_y)
+ private inline void on_click (GestureMultiPress _click_controller, int n_press, double event_x, double
event_y)
{
if (game == null || game.animating)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]