diff --git a/docs/changes.txt b/docs/changes.txt index 7cdd7926a1..2d1e008219 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -613,6 +613,7 @@ wxGTK: - Fix AUI panel re-docking. - Add support for wxDD_DIR_MUST_EXIST to wxDirDialog. - Fix disappearing mouse clicks when using wxTreeCtrl. +- Fix calls to Move{Before,After}InTabOrder() after parent window creation. wxMSW: diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index bce406a4a2..e71ca1db8d 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -3549,8 +3549,15 @@ wxWindowGTK::AdjustForLayoutDirection(wxCoord x, void wxWindowGTK::DoMoveInTabOrder(wxWindow *win, WindowOrder move) { wxWindowBase::DoMoveInTabOrder(win, move); - m_dirtyTabOrder = true; - wxTheApp->WakeUpIdle(); + + // Update the TAB order at GTK+ level too, but do it slightly later in case + // we're changing the TAB order of several controls at once, as is common. + wxWindow* const parent = GetParent(); + if ( parent ) + { + parent->m_dirtyTabOrder = true; + wxTheApp->WakeUpIdle(); + } } bool wxWindowGTK::DoNavigateIn(int flags)