[gtk+] Revert "gtkwidget: Ensure unrealization during event dispatching cancels gestures"
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Revert "gtkwidget: Ensure unrealization during event dispatching cancels gestures"
- Date: Fri, 18 Sep 2015 11:04:14 +0000 (UTC)
commit f860afc92edb85ad60b17071fdf7e83fc947743c
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Sep 18 12:59:00 2015 +0200
Revert "gtkwidget: Ensure unrealization during event dispatching cancels gestures"
This reverts commit 13873d2c507783042df55ad2c48f37a346121fd0.
gtk/gtkwidget.c | 34 ++--------------------------------
1 files changed, 2 insertions(+), 32 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index ebfc1ff..ffd6b99 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -7356,22 +7356,6 @@ cancel_event_sequence_on_hierarchy (GtkWidget *widget,
}
}
-static void
-event_check_cancel_sequence_on_hierarchy (GtkWidget *widget,
- GdkEvent *event)
-{
- GdkDevice *source_device;
-
- source_device = gdk_event_get_source_device (event);
-
- if (source_device &&
- gdk_device_get_source (source_device) != GDK_SOURCE_KEYBOARD &&
- event->type != GDK_ENTER_NOTIFY && event->type != GDK_LEAVE_NOTIFY)
- cancel_event_sequence_on_hierarchy (widget,
- gtk_get_event_widget (event),
- gdk_event_get_event_sequence (event));
-}
-
gboolean
_gtk_widget_captured_event (GtkWidget *widget,
GdkEvent *event)
@@ -7402,15 +7386,7 @@ _gtk_widget_captured_event (GtkWidget *widget,
g_object_ref (widget);
return_val |= handler (widget, event);
-
- if (!WIDGET_REALIZED_FOR_EVENT (widget, event))
- {
- /* We stop event propagation, but still we must ensure the sequence is
- * cancelled across the widget hierarchy.
- */
- event_check_cancel_sequence_on_hierarchy (widget, event);
- return_val = TRUE;
- }
+ return_val |= !WIDGET_REALIZED_FOR_EVENT (widget, event);
/* The widget that was originally to receive the event
* handles motion hints, but the capturing widget might
@@ -7725,13 +7701,7 @@ gtk_widget_event_internal (GtkWidget *widget,
if (WIDGET_REALIZED_FOR_EVENT (widget, event))
g_signal_emit (widget, widget_signals[EVENT_AFTER], 0, event);
else
- {
- /* We stop event propagation, but still we must ensure the sequence is
- * cancelled across the widget hierarchy.
- */
- event_check_cancel_sequence_on_hierarchy (widget, event);
- return_val = TRUE;
- }
+ return_val = TRUE;
g_object_unref (widget);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]