+//-----------------------------------------------------------------------------
+// "button_press_event" from slider
+//-----------------------------------------------------------------------------
+
+static gint gtk_scrollbar_button_press_callback( GtkRange *WXUNUSED(widget),
+ GdkEventButton *WXUNUSED(gdk_event),
+ wxScrollBar *win )
+{
+ if (g_isIdle) wxapp_install_idle_handler();
+
+ win->m_isScrolling = TRUE;
+// g_blockEventsOnScroll = TRUE; doesn't work in DialogEd
+
+ return FALSE;
+}
+
+//-----------------------------------------------------------------------------
+// "button_release_event" from slider
+//-----------------------------------------------------------------------------
+
+static gint gtk_scrollbar_button_release_callback( GtkRange *WXUNUSED(widget),
+ GdkEventButton *WXUNUSED(gdk_event),
+ wxScrollBar *win )
+{
+ if (g_isIdle) wxapp_install_idle_handler();
+
+ wxASSERT( win->m_isScrolling );
+
+ win->m_isScrolling = FALSE;
+// g_blockEventsOnScroll = FALSE;
+
+ wxEventType command = wxEVT_SCROLL_THUMBTRACK;
+ int value = (int)ceil(win->m_adjust->value);
+ int dir = win->HasFlag(wxSB_VERTICAL) ? wxVERTICAL : wxHORIZONTAL;
+
+ wxScrollEvent event( command, value, dir );
+ event.SetScrolling( FALSE );
+ event.SetEventObject( win );
+ win->GetEventHandler()->ProcessEvent( event );
+
+ return FALSE;
+}
+
+//-----------------------------------------------------------------------------
+// wxScrollBar
+//-----------------------------------------------------------------------------
+