From 1b24b2b48cd956343d9030c028a7a51168383d41 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Wed, 9 Feb 2005 22:49:32 +0000 Subject: [PATCH] Applied patch for more compliant wxScrolbar event generation order. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/scrolbar.cpp | 9 +++++---- src/gtk1/scrolbar.cpp | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/gtk/scrolbar.cpp b/src/gtk/scrolbar.cpp index 28cf2350d8..d9846c1067 100644 --- a/src/gtk/scrolbar.cpp +++ b/src/gtk/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() ); diff --git a/src/gtk1/scrolbar.cpp b/src/gtk1/scrolbar.cpp index 28cf2350d8..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() ); -- 2.45.2