diff --git a/include/wx/generic/listctrl.h b/include/wx/generic/listctrl.h index 5d191352b2..69dfcd94d2 100644 --- a/include/wx/generic/listctrl.h +++ b/include/wx/generic/listctrl.h @@ -607,7 +607,12 @@ class WXDLLEXPORT wxListCtrl: public wxControl bool DoPopupMenu( wxMenu *menu, int x, int y ) { return m_mainWin->PopupMenu( menu, x, y ); } void SetFocus() - { m_mainWin->SetFocus(); } + { + /* The test in window.cpp fails as we are a composite + window, so it checks against "this", but not m_mainWin. */ + if(FindFocus() != this) + m_mainWin->SetFocus(); + } // implementation diff --git a/include/wx/menuitem.h b/include/wx/menuitem.h index 63b3137ec0..6fda4bd30d 100644 --- a/include/wx/menuitem.h +++ b/include/wx/menuitem.h @@ -45,7 +45,6 @@ class WXDLLEXPORT wxMenu; class WXDLLEXPORT wxMenuItemBase : public wxObject { public: - wxMenuItemBase() { } // creation static wxMenuItem *New(wxMenu *parentMenu = (wxMenu *)NULL, @@ -118,6 +117,10 @@ protected: bool m_isCheckable; // can be checked? bool m_isChecked; // is checked? bool m_isEnabled; // is enabled? + + // some compilers need a default constructor here, do not use + wxMenuItemBase() + { } }; // ---------------------------------------------------------------------------- diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index fb0fb302c4..d09ee10763 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -2475,7 +2475,7 @@ void wxWindow::GetTextExtent( const wxString& string, void wxWindow::SetFocus() { wxCHECK_RET( (m_widget != NULL), wxT("invalid window") ); - + if (m_wxwindow) { if (!GTK_WIDGET_HAS_FOCUS (m_wxwindow)) diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index fb0fb302c4..d09ee10763 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -2475,7 +2475,7 @@ void wxWindow::GetTextExtent( const wxString& string, void wxWindow::SetFocus() { wxCHECK_RET( (m_widget != NULL), wxT("invalid window") ); - + if (m_wxwindow) { if (!GTK_WIDGET_HAS_FOCUS (m_wxwindow))