[gtk+/touch-text-selection: 4/4] scrolledwindow: don't capture events meant for non-child windows



commit f58456c5ecef3ba8313aef0262716177dc20fddc
Author: Carlos Garnacho <carlos lanedo com>
Date:   Wed Jul 11 16:44:16 2012 +0200

    scrolledwindow: don't capture events meant for non-child windows
    
    GtkTextHandle creates temporary override redirect windows, but still
    hook to the text widget for events, so those are effectively captured
    by GtkScrolledWindow if a text widget is within it

 gtk/gtkscrolledwindow.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 71a68c2..a6ae0ad 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -2907,6 +2907,9 @@ gtk_scrolled_window_captured_event (GtkWidget *widget,
   gboolean retval = FALSE;
   GtkScrolledWindowPrivate *priv = GTK_SCROLLED_WINDOW (widget)->priv;
 
+  if (gdk_window_get_window_type (event->any.window) == GDK_WINDOW_TEMP)
+    return FALSE;
+
   switch (event->type)
     {
     case GDK_TOUCH_BEGIN:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]