const double oldPos = win->m_pos;
win->m_pos = value;
- if (!win->m_hasVMT || g_blockEventsOnDrag)
+ if (g_blockEventsOnDrag)
return;
if (win->GTKEventsDisabled())
wxSlider::wxSlider()
{
- m_pos = 0;
- m_scrollEventType = GTK_SCROLL_NONE;
- m_needThumbRelease = false;
- m_blockScrollEvent = false;
+ m_scale = NULL;
+}
+
+wxSlider::~wxSlider()
+{
+ if (m_scale && m_scale != m_widget)
+ GTKDisconnect(m_scale);
}
bool wxSlider::Create(wxWindow *parent,
{
m_pos = value;
m_scrollEventType = GTK_SCROLL_NONE;
+ m_needThumbRelease = false;
+ m_blockScrollEvent = false;
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, validator, name ))
else
m_widget = gtk_vbox_new(false, 0);
g_object_ref(m_widget);
- gtk_widget_show( m_widget );
gtk_container_add( GTK_CONTAINER(m_widget), m_scale );
GtkWidget *box;
GdkWindow *wxSlider::GTKGetWindow(wxArrayGdkWindows& WXUNUSED(windows)) const
{
+#ifdef __WXGTK3__
+ // no access to internal GdkWindows
+ return NULL;
+#else
return GTK_RANGE(m_scale)->event_window;
+#endif
}
// static