static void scroll_v_action( GtkWidget *w, gpointer data) { GrowWidgetGtk *groww = (GrowWidgetGtk *)data; if ( groww->scroll_v_ignore) { groww->scroll_v_ignore = 0; return; } GrowCtx *ctx = (GrowCtx *) groww->grow_ctx; gdouble value; value = gtk_range_get_value( GTK_RANGE(groww->scroll_v)); if ( value == 0 && fabs(groww->scroll_v_value) > 2) { // Probably a resize that seems to set value to zero, set old value ctx->change_scrollbar(); return; } groww->scroll_v_value = value; glow_scroll_vertical( ctx, int(value), 0); }