"Maximum scroll velocity when overshooting",
"Maximum distance the child widget should scroll "
"per 'frame', in pixels per frame when it overshoots after hitting the edge.",
- 0, G_MAXDOUBLE, 20,
+ 0, G_MAXDOUBLE, 130,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT));
(gpointer) & priv->child);
event = (GdkEventButton *) gdk_event_copy ((GdkEvent *) event);
+ /* remove the reference we added with the copy */
+ g_object_unref (priv->event_window);
event->x = x;
event->y = y;
priv->cx = x;
*vel *= -1;
} else if ((*overshooting > 1) && (*vel < 0)) {
/* we add the MIN in order to avoid very small speeds */
- *vel = MIN ((((gdouble)*overshot_dist)*0.4) * -1, -2.0);
+ *vel = MIN (((((gdouble)*overshot_dist)*0.8) * -1), -10.0);
}
*overshot_dist = CLAMP (*overshot_dist + *vel, 0, overshoot_max);
*vel *= -1;
} else if ((*overshooting > 1) && (*vel > 0)) {
/* we add the MAX in order to avoid very small speeds */
- *vel = MAX ((((gdouble)*overshot_dist)*0.4) * -1, 2.0);
+ *vel = MAX (((((gdouble)*overshot_dist)*0.8) * -1), 10.0);
}
*overshot_dist = CLAMP (*overshot_dist + (*vel), -overshoot_max, 0);
hildon_pannable_area_scroll (area, priv->vel_x, priv->vel_y);
+ gdk_window_process_updates (GTK_WIDGET (area)->window, FALSE);
+
return TRUE;
}
(priv->mode != HILDON_PANNABLE_AREA_MODE_AUTO)) {
if (!priv->idle_id)
- priv->idle_id = gdk_threads_add_timeout_full (GDK_PRIORITY_EVENTS-10,
- (guint)(1000.0 / (gdouble) priv->sps),
- (GSourceFunc)hildon_pannable_area_timeout,
- area, NULL);
+ priv->idle_id = gdk_threads_add_timeout ((gint)
+ (1000.0 / (gdouble) priv->sps),
+ (GSourceFunc)
+ hildon_pannable_area_timeout, area);
}
}
}
if (priv->child) {
/* Send motion notify to child */
event = (GdkEventMotion *) gdk_event_copy ((GdkEvent *) event);
+ /* remove the reference we added with the copy */
+ g_object_unref (priv->event_window);
event->x = priv->cx + (event->x - priv->ix);
event->y = priv->cy + (event->y - priv->iy);
event->window = g_object_ref (priv->child);
/* If overshoot has been initiated with a finger down, on release set max speed */
if (priv->overshot_dist_y != 0) {
priv->overshooting_y = priv->bounce_steps; /* Hack to stop a bounce in the finger down case */
- priv->vel_y = priv->vmax_overshooting;
+ priv->vel_y = priv->overshot_dist_y * 0.9;
}
if (priv->overshot_dist_x != 0) {
priv->overshooting_x = priv->bounce_steps; /* Hack to stop a bounce in the finger down case */
- priv->vel_x = priv->vmax_overshooting;
+ priv->vel_x = priv->overshot_dist_x * 0.9;
}
priv->button_pressed = FALSE;
priv->vel_y = (priv->vel_y > 0) ? priv->vmax : -priv->vmax;
if (!priv->idle_id)
- priv->idle_id = gdk_threads_add_timeout_full (GDK_PRIORITY_EVENTS-10,
- (guint)(1000.0 / (gdouble) priv->sps),
- (GSourceFunc)hildon_pannable_area_timeout,
- area, NULL);
+ priv->idle_id = gdk_threads_add_timeout ((gint) (1000.0 / (gdouble) priv->sps),
+ (GSourceFunc)
+ hildon_pannable_area_timeout, widget);
} else {
if (priv->center_on_child_focus_pending) {
hildon_pannable_area_center_on_child_focus (area);
event->x, event->y, &x, &y, GDK_BUTTON_RELEASE_MASK);
event = (GdkEventButton *) gdk_event_copy ((GdkEvent *) event);
+ /* remove the reference we added with the copy */
+ g_object_unref (priv->event_window);
event->x = x;
event->y = y;
hildon_pannable_area_launch_fade_timeout (area, 1.0);
if (!priv->idle_id)
- priv->idle_id = gdk_threads_add_timeout_full (GDK_PRIORITY_EVENTS-10,
- (guint)(1000.0 / (gdouble) priv->sps),
- (GSourceFunc)hildon_pannable_area_timeout,
- area, NULL);
+ priv->idle_id = gdk_threads_add_timeout ((gint) (1000.0 / (gdouble) priv->sps),
+ (GSourceFunc)
+ hildon_pannable_area_timeout, area);
}
/**