X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7c2f14eeb84c08651a96050ff1f05d195fe3db7f..1306e7d6eca73adb57bc6e50d22108371c0241e7:/src/gtk1/scrolbar.cpp diff --git a/src/gtk1/scrolbar.cpp b/src/gtk1/scrolbar.cpp index a2bb3082e8..d9846c1067 100644 --- a/src/gtk1/scrolbar.cpp +++ b/src/gtk1/scrolbar.cpp @@ -67,10 +67,6 @@ static void gtk_scrollbar_callback( GtkAdjustment *adjust, int orient = win->HasFlag(wxSB_VERTICAL) ? wxVERTICAL : wxHORIZONTAL; - wxScrollEvent event( command, win->GetId(), value, orient ); - event.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent( event ); - // throw a LINEUP / LINEDOWN event if necessary if (g_currentUpDownEvent != wxEVT_NULL) { @@ -78,6 +74,11 @@ static void gtk_scrollbar_callback( GtkAdjustment *adjust, event.SetEventObject( win ); win->GetEventHandler()->ProcessEvent( event ); } + + // throw other event (wxEVT_SCROLL_THUMBTRACK) + wxScrollEvent event( command, win->GetId(), value, orient ); + event.SetEventObject( win ); + win->GetEventHandler()->ProcessEvent( event ); /* wxCommandEvent cevent( wxEVT_COMMAND_SCROLLBAR_UPDATED, win->GetId() ); @@ -102,7 +103,7 @@ static gint gtk_scrollbar_button_press_callback( GtkRange *widget, int scroll_height, mouse_pos; // get the mouse position when the click is done - if (widget->orientation == GTK_ORIENTATION_VERTICAL) + if (win->HasFlag(wxSB_VERTICAL)) { scroll_height = GTK_WIDGET(widget)->allocation.height - 16; mouse_pos = (int)gdk_event->y;