Do not set focus inside ShowModal. Fixes wxWindow::SetFocus for modal dialogs, and wxFileDialog initial focus problem. Index: src/gtk/dialog.cpp =================================================================== RCS file: /pack/cvsroots/wxwidgets/wxWidgets/src/gtk/dialog.cpp,v retrieving revision 1.109 retrieving revision 1.109.2.1 diff -u -B -w -p -r1.109 -r1.109.2.1 --- src/gtk/dialog.cpp 2005/06/20 08:18:39 1.109 +++ src/gtk/dialog.cpp 2006/07/29 16:40:58 1.109.2.1 @@ -205,8 +205,6 @@ int wxDialog::ShowModal() wxBusyCursorSuspender cs; // temporarily suppress the busy cursor Show( true ); - - SetFocus(); m_modalShowing = true;