2009-01-23 Alejandro G. Castro <alex@igalia.com>
authorAlejandro G. Castro <alex@igalia.com>
Fri, 23 Jan 2009 18:25:13 +0000 (18:25 +0000)
committerAlejandro G. Castro <alex@igalia.com>
Fri, 23 Jan 2009 18:25:13 +0000 (18:25 +0000)
Reverted commit 34028, it was causing regressions, probably the
topmost condition is not correct, we have to check it in more
detail. We have reopened the bug: NB#97458 (Pannable area prevents
propagation of button press events)

ChangeLog
src/hildon-pannable-area.c

index 9c8c0bd..46e0ed1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-01-23  Alejandro G. Castro  <alex@igalia.com>
+
+       Reverted commit 34028, it was causing regressions, probably the
+       topmost condition is not correct, we have to check it in more
+       detail. We have reponed the bug: NB#97458 (Pannable area prevents
+       propagation of button press events)
+
 2009-01-23  Claudio Saavedra  <csaavedra@igalia.com>
 
        * src/hildon-time-selector.c: (_manage_ampm_selection_cb): Verify
index de1fe13..b906b80 100644 (file)
@@ -184,8 +184,7 @@ static gboolean hildon_pannable_area_expose_event (GtkWidget * widget,
                                                    GdkEventExpose * event);
 static GdkWindow * hildon_pannable_area_get_topmost (GdkWindow * window,
                                                      gint x, gint y,
-                                                     gint * tx, gint * ty,
-                                                     GdkEventMask mask);
+                                                     gint * tx, gint * ty);
 static void synth_crossing (GdkWindow * child,
                             gint x, gint y,
                             gint x_root, gint y_root,
@@ -1304,8 +1303,7 @@ hildon_pannable_area_expose_event (GtkWidget * widget,
 static GdkWindow *
 hildon_pannable_area_get_topmost (GdkWindow * window,
                                   gint x, gint y,
-                                  gint * tx, gint * ty,
-                                  GdkEventMask mask)
+                                  gint * tx, gint * ty)
 {
   /* Find the GdkWindow at the given point, by recursing from a given
    * parent GdkWindow. Optionally return the co-ordinates transformed
@@ -1329,19 +1327,11 @@ hildon_pannable_area_get_topmost (GdkWindow * window,
       gdk_drawable_get_size (GDK_DRAWABLE (child), &width, &height);
       gdk_window_get_position (child, &wx, &wy);
 
-      if ((x >= wx) && (x < (wx + width)) && (y >= wy) && (y < (wy + height))) {
-        gpointer widget;
-
-        gdk_window_get_user_data (child, &widget);
-
-        if ((gdk_window_is_visible (child)) &&
-            (GTK_IS_CONTAINER (widget) ||
-             (gdk_window_get_events (child)&mask))) {
-          child_x = x - wx;
-          child_y = y - wy;
-          window = child;
-          break;
-        }
+      if (((x >= wx) && (x < (wx + width)) && (y >= wy)
+           && (y < (wy + height))) && (gdk_window_is_visible (child))) {
+       child_x = x - wx;
+       child_y = y - wy;
+       window = child;
       }
     }
 
@@ -1430,7 +1420,7 @@ hildon_pannable_area_button_press_cb (GtkWidget * widget,
       (ABS (priv->vel_y) <= (priv->vmax * priv->vfast_factor)))
     priv->child =
       hildon_pannable_area_get_topmost (gtk_bin_get_child (GTK_BIN (widget))->window,
-                                       event->x, event->y, &x, &y, GDK_BUTTON_PRESS_MASK);
+                                       event->x, event->y, &x, &y);
   else
     priv->child = NULL;
 
@@ -2065,7 +2055,7 @@ hildon_pannable_area_button_release_cb (GtkWidget * widget,
 
   child =
     hildon_pannable_area_get_topmost (gtk_bin_get_child (GTK_BIN (widget))->window,
-                                     event->x, event->y, &x, &y, GDK_BUTTON_RELEASE_MASK);
+                                     event->x, event->y, &x, &y);
 
   event = (GdkEventButton *) gdk_event_copy ((GdkEvent *) event);
   event->x = x;
@@ -2625,7 +2615,7 @@ hildon_pannable_get_child_widget_at (HildonPannableArea *area,
 
   window = hildon_pannable_area_get_topmost
     (gtk_bin_get_child (GTK_BIN (area))->window,
-     x, y, NULL, NULL, GDK_ALL_EVENTS_MASK);
+     x, y, NULL, NULL);
 
   gdk_window_get_user_data (window, (gpointer) &child_widget);