- if (g_isIdle) wxapp_install_idle_handler();
-
- if (!win->m_hasVMT) return;
- if (g_blockEventsOnDrag) return;
-
- float diff = win->m_adjust->value - win->m_oldPos;
- if (fabs(diff) < sensitivity) return;
- win->m_oldPos = win->m_adjust->value;
-
- wxEventType command = wxEVT_NULL;
-
- float line_step = win->m_adjust->step_increment;
- float page_step = win->m_adjust->page_increment;
+ const double value = gtk_spin_button_get_value(spinbutton);
+ const int pos = int(value);
+ const int oldPos = win->m_pos;
+ if (g_blockEventsOnDrag || pos == oldPos)
+ {
+ win->m_pos = pos;
+ return;
+ }