X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bde56d09bb9915462039bcb8955c2f81e74cc953..d48f13a168143e97c271bbeb2f544a63983ee435:/src/msw/frame.cpp diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index 31886a93ef..65b40d01f5 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -239,11 +239,6 @@ void wxFrame::DoGetClientSize(int *x, int *y) const // wxFrame: various geometry-related functions // ---------------------------------------------------------------------------- -void wxFrame::Raise() -{ - ::SetForegroundWindow(GetHwnd()); -} - // generate an artificial resize event void wxFrame::SendSizeEvent(int flags) { @@ -385,7 +380,7 @@ void wxFrame::AttachMenuBar(wxMenuBar *menubar) // adjust for menu / titlebar height rc.bottom -= (2*menuHeight-1); - ::MoveWindow(Gethwnd(), rc.left, rc.top, rc.right, rc.bottom, FALSE); + ::MoveWindow(GetHwnd(), rc.left, rc.top, rc.right, rc.bottom, FALSE); } #endif @@ -437,8 +432,12 @@ void wxFrame::InternalSetMenuBar() // Responds to colour changes, and passes event on to children. void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event) { - SetOwnBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE)); - Refresh(); + // Don't override the colour explicitly set by the user, if any. + if ( !UseBgCol() ) + { + SetOwnBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE)); + Refresh(); + } #if wxUSE_STATUSBAR if ( m_frameStatusBar ) @@ -859,7 +858,7 @@ bool wxFrame::DoSendMenuOpenCloseEvent(wxEventType evtType, wxMenu* menu, bool popup) { wxMenuEvent event(evtType, popup ? wxID_ANY : 0, menu); - event.SetEventObject(this); + event.SetEventObject(menu); return HandleWindowEvent(event); }