[gtk+] window: Add comment documenting the target widget checks during window drag
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] window: Add comment documenting the target widget checks during window drag
- Date: Thu, 5 Mar 2015 10:52:55 +0000 (UTC)
commit 40c8d8bcf414e58a28abbdde9571e83cc137c0fe
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Mar 3 22:17:58 2015 +0100
window: Add comment documenting the target widget checks during window drag
Was suggested during review of
https://bugzilla.gnome.org/show_bug.cgi?id=745562#c2
gtk/gtkwindow.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 92d7a03..c419698 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -1549,6 +1549,15 @@ drag_gesture_update_cb (GtkGestureDrag *gesture,
event = gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);
event_widget = gtk_get_event_widget ((GdkEvent *) event);
+ /* Check whether the target widget should be left alone at handling
+ * the sequence, this is better done late to give room for gestures
+ * there to go denied.
+ *
+ * Besides claiming gestures, we must bail out too if there's gestures
+ * in the "none" state at this point, as those are still handling events
+ * and can potentially go claimed, and we don't want to stop the target
+ * widget from doing anything.
+ */
if (event_widget != GTK_WIDGET (window) &&
!gtk_widget_has_grab (event_widget) &&
_gtk_widget_consumes_motion (event_widget, sequence))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]