[gtk/wip/carlosg/public-legacy-controller: 6/8] testsuite: Fix gestures tests for the legacy controller
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/carlosg/public-legacy-controller: 6/8] testsuite: Fix gestures tests for the legacy controller
- Date: Mon, 15 Oct 2018 15:41:08 +0000 (UTC)
commit 21d0e30903ec6035377692e4a557b32e09e99fc2
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Oct 15 17:29:32 2018 +0200
testsuite: Fix gestures tests for the legacy controller
Let it create one with the right propagation phase, so the event propagation
chain stays the same.
testsuite/gtk/gestures.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/testsuite/gtk/gestures.c b/testsuite/gtk/gestures.c
index 2115608983..5591f1ad48 100644
--- a/testsuite/gtk/gestures.c
+++ b/testsuite/gtk/gestures.c
@@ -385,6 +385,7 @@ add_legacy (GtkWidget *w, GString *str, gboolean exit)
data->str = str;
data->exit = exit;
+ gtk_event_controller_set_propagation_phase (data->controller, GTK_PHASE_BUBBLE);
gtk_widget_add_controller (w, data->controller);
g_signal_connect (data->controller, "event", G_CALLBACK (legacy_cb), data);
}
@@ -464,6 +465,10 @@ test_mixed (void)
str = g_string_new ("");
+ add_legacy (A, str, GDK_EVENT_PROPAGATE);
+ add_legacy (B, str, GDK_EVENT_PROPAGATE);
+ add_legacy (C, str, GDK_EVENT_PROPAGATE);
+
add_gesture (A, "a1", GTK_PHASE_CAPTURE, str, GTK_EVENT_SEQUENCE_NONE);
add_gesture (B, "b1", GTK_PHASE_CAPTURE, str, GTK_EVENT_SEQUENCE_NONE);
add_gesture (C, "c1", GTK_PHASE_CAPTURE, str, GTK_EVENT_SEQUENCE_NONE);
@@ -474,10 +479,6 @@ test_mixed (void)
add_gesture (B, "b3", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_NONE);
add_gesture (C, "c3", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_NONE);
- add_legacy (A, str, GDK_EVENT_PROPAGATE);
- add_legacy (B, str, GDK_EVENT_PROPAGATE);
- add_legacy (C, str, GDK_EVENT_PROPAGATE);
-
gtk_widget_get_allocation (A, &allocation);
point_update (&mouse_state, A, allocation.width / 2, allocation.height / 2);
@@ -523,6 +524,10 @@ test_early_exit (void)
str = g_string_new ("");
+ add_legacy (A, str, GDK_EVENT_PROPAGATE);
+ add_legacy (B, str, GDK_EVENT_STOP);
+ add_legacy (C, str, GDK_EVENT_PROPAGATE);
+
add_gesture (A, "a1", GTK_PHASE_CAPTURE, str, GTK_EVENT_SEQUENCE_NONE);
add_gesture (B, "b1", GTK_PHASE_CAPTURE, str, GTK_EVENT_SEQUENCE_NONE);
add_gesture (C, "c1", GTK_PHASE_CAPTURE, str, GTK_EVENT_SEQUENCE_NONE);
@@ -531,10 +536,6 @@ test_early_exit (void)
add_gesture (B, "b3", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_NONE);
add_gesture (C, "c3", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_NONE);
- add_legacy (A, str, GDK_EVENT_PROPAGATE);
- add_legacy (B, str, GDK_EVENT_STOP);
- add_legacy (C, str, GDK_EVENT_PROPAGATE);
-
gtk_widget_get_allocation (A, &allocation);
point_update (&mouse_state, A, allocation.width / 2, allocation.height / 2);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]