#include "wx/scrolbar.h"
#include "wx/utils.h"
+//-----------------------------------------------------------------------------
+// data
+//-----------------------------------------------------------------------------
+
+extern bool g_blockEventsOnDrag;
+
//-----------------------------------------------------------------------------
// wxScrollBar
//-----------------------------------------------------------------------------
-void gtk_scrollbar_callback( GtkWidget *WXUNUSED(widget), wxScrollBar *win )
+static void gtk_scrollbar_callback( GtkWidget *WXUNUSED(widget), wxScrollBar *win )
{
-/*
- printf( "OnScroll from " );
- if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
- printf( win->GetClassInfo()->GetClassName() );
- printf( ".\n" );
-*/
-
if (!win->HasVMT()) return;
+ if (g_blockEventsOnDrag) return;
float diff = win->m_adjust->value - win->m_oldPos;
if (fabs(diff) < 0.2) return;