Any workaround for assigning changed values to Gtk.Scale without issues?

Since I’m aware of this bug in Gtk.Adjustment. When I’m using this code in the music player project I’m working on:

private void UpdatePositionIndicators(long ticks)
{
	if (_positionScaleFree)
	{
		_positionScale.SetValue(ticks);
	}
}

When playing a song, the music player will show the position bar for a split second before vanishing with this error in the terminal:

Gtk-WARNING **: 16:27:33.470: Trying to snapshot GtkGizmo 0000024077308aa0 without a current allocation

The _positionScale variable is a Gtk.Scale, and is assigned with a Gtk.Adjustment, which is required. I have used every option that the Gtk.Scale widget has to offer, but none of them avoid this bug. This bug only happens when values are assigned automatically to move the scale bar, but there’s no problem with moving the scale bar manually with a left mouse click. And the _positionScaleFree is just a boolean variable.

So I’m really curious, is there a workaround to this bug in C (or C# or any programming language binding)?

What is _positionScaleFree?

It’s a boolean variable, it’s there to ensure if the position scale is freely available or not

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.