X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b09bda689c8525886d217a9b171b354391cd6d78..4fcd60c72f6b90f5063f7000ff5a80a9004055a3:/src/msw/window.cpp?ds=sidebyside diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 228c270785..aa47fded24 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -323,17 +323,21 @@ wxWindowMSW::~wxWindowMSW() MSWDetachWindowMenu(); +#ifndef __WXUNIVERSAL__ // VS: make sure there's no wxFrame with last focus set to us: - for (wxWindow *win = GetParent(); win; win = win->GetParent()) + for ( wxWindow *win = GetParent(); win; win = win->GetParent() ) { wxFrame *frame = wxDynamicCast(win, wxFrame); if ( frame ) { if ( frame->GetLastFocus() == this ) + { frame->SetLastFocus((wxWindow*)NULL); + } break; } } +#endif // __WXUNIVERSAL__ // VS: destroy children first and _then_ detach *this from its parent. // If we'd do it the other way around, children wouldn't be able @@ -1642,6 +1646,8 @@ void wxWindowMSW::GetCaretPos(int *x, int *y) const // popup menu // --------------------------------------------------------------------------- +#if wxUSE_MENUS_NATIVE + // yield for WM_COMMAND events only, i.e. process all WM_COMMANDs in the queue // immediately, without waiting for the next event loop iteration // @@ -1659,8 +1665,6 @@ static void wxYieldForCommandsOnly() } } -#if wxUSE_MENUS_NATIVE - bool wxWindowMSW::DoPopupMenu(wxMenu *menu, int x, int y) { menu->SetInvokingWindow(this); @@ -2864,8 +2868,7 @@ bool wxWindowMSW::MSWCreate(int id, if ( !m_hWnd ) { - wxLogError(_("Can't create window of class %s!\nPossible Windows 3.x compatibility problem?"), - wclass); + wxLogSysError(_("Can't create window of class %s"), wclass); return FALSE; }