2009-01-15 Alejandro G. Castro <alex@igalia.com>
* src/hildon-pannable-area.c,
+ (hildon_pannable_area_get_topmost): Added a new parameter to
+ filter the the windows that do not include those events. Added
+ also a condition when finding the window to filter windows that do
+ not ask for those events.
+ (hildon_pannable_area_button_press_cb),
+ (hildon_pannable_area_button_release_cb),
+ (hildon_pannable_get_child_widget_at): Reviewed the call the the
+ topmost function, we have added the new parameter.
+
+ Fixes: NB#97458 (Pannable area prevents propagation of button
+ press events)
+
+2009-01-15 Alejandro G. Castro <alex@igalia.com>
+
+ * src/hildon-pannable-area.c,
(hildon_pannable_area_initial_effect): Added controls before
launching the timeout and the idle functions.
(hildon_pannable_area_scroll_indicator_fade): Reviewed the logic
GdkEventExpose * event);
static GdkWindow * hildon_pannable_area_get_topmost (GdkWindow * window,
gint x, gint y,
- gint * tx, gint * ty);
+ gint * tx, gint * ty,
+ GdkEventMask mask);
static void synth_crossing (GdkWindow * child,
gint x, gint y,
gint x_root, gint y_root,
static GdkWindow *
hildon_pannable_area_get_topmost (GdkWindow * window,
gint x, gint y,
- gint * tx, gint * ty)
+ gint * tx, gint * ty,
+ GdkEventMask mask)
{
/* Find the GdkWindow at the given point, by recursing from a given
* parent GdkWindow. Optionally return the co-ordinates transformed
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))) && (gdk_window_is_visible (child))) {
- child_x = x - wx;
- child_y = y - wy;
- window = child;
+ 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;
+ }
}
}
(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);
+ event->x, event->y, &x, &y, GDK_BUTTON_PRESS_MASK);
else
priv->child = NULL;
child =
hildon_pannable_area_get_topmost (gtk_bin_get_child (GTK_BIN (widget))->window,
- event->x, event->y, &x, &y);
+ event->x, event->y, &x, &y, GDK_BUTTON_RELEASE_MASK);
event = (GdkEventButton *) gdk_event_copy ((GdkEvent *) event);
event->x = x;
window = hildon_pannable_area_get_topmost
(gtk_bin_get_child (GTK_BIN (area))->window,
- x, y, NULL, NULL);
+ x, y, NULL, NULL, GDK_ALL_EVENTS_MASK);
gdk_window_get_user_data (window, (gpointer) &child_widget);