+2008-07-15 Alejandro G. Castro <alex@igalia.com>
+
+ Changes required in order to allow vfast_factor set to zero to
+ work properly.
+
+ * src/hildon-pannable-area.c:
+ (hildon_pannable_area_button_press_cb): Changed the condition, it
+ is required for not allowing click when vfast_factor is zero.
+ (hildon_pannable_area_timeout): Initialized velocity variables
+ when we stop moving, it was less than 1 but not zero and we need
+ to check zero in some situations.
+ (hildon_pannable_area_class_init): Changed the default value of
+ the speed factor, now the button_press is just sent in case the
+ speed is 2 per cent of the max speed.
+ (hildon_pannable_area_init): Initialization with 0.
+
2008-07-04 Alejandro G. Castro <alex@igalia.com>
* src/hildon-pannable-area.c,
/* Don't allow a click if we're still moving fast, where fast is
* defined as a quarter of our top possible speed.
*/
- if ((ABS (priv->vel_x) < (priv->vmax * priv->vfast_factor)) &&
- (ABS (priv->vel_y) < (priv->vmax * priv->vfast_factor)))
+ if ((ABS (priv->vel_x) <= (priv->vmax * priv->vfast_factor)) &&
+ (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);
priv->vel_y *= priv->decel;
if ((ABS (priv->vel_x) < 1.0) && (ABS (priv->vel_y) < 1.0)) {
+ priv->vel_x = 0;
+ priv->vel_y = 0;
priv->idle_id = 0;
return FALSE;
}
"Minimum velocity that is considered 'fast': "
"children widgets won't receive button presses. "
"Expressed as a fraction of the maximum velocity.",
- 0, 1, 0.25,
+ 0, 1, 0.02,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT));
priv->overshooting_y = 0;
priv->overshooting_x = 0;
priv->idle_id = 0;
- priv->vel_x = 0.0;
- priv->vel_y = 0.0;
+ priv->vel_x = 0;
+ priv->vel_y = 0;
priv->scroll_indicator_alpha = 0;
priv->scroll_indicator_timeout = 0;
priv->scroll_indicator_event_interrupt = 0;