- win->m_needThumbRelease = false;
- ProcessScrollEvent(win, wxEVT_SCROLL_THUMBRELEASE);
+ g_signal_handlers_block_by_func(range, (gpointer) gtk_event_after, win);
+
+ if (win->m_needThumbRelease)
+ {
+ win->m_needThumbRelease = false;
+ ProcessScrollEvent(win, wxEVT_SCROLL_THUMBRELEASE);
+ }
+ // Keep slider at an integral position
+ win->BlockScrollEvent();
+ gtk_range_set_value(GTK_RANGE (win->m_widget), win->GetValue());
+ win->UnblockScrollEvent();