- 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;
+ 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;
+ }