X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/58abfef64f8b685c8e77a608f24cb1b618e3c83c..0f3e3e0c300988a7520b39b90d28517b84882190:/src/msw/frame.cpp?ds=inline diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index 0099a31787..b115aa8ed6 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -35,6 +35,7 @@ #include "wx/statusbr.h" #include "wx/toolbar.h" #include "wx/menuitem.h" +#include "wx/log.h" #ifdef LoadAccelerators #undef LoadAccelerators @@ -119,7 +120,12 @@ bool wxFrame::Create(wxWindow *parent, // we pass NULL as parent to MSWCreate because frames with parents behave // very strangely under Win95 shell - MSWCreate(m_windowId, NULL, wxFrameClassName, this, title, + // Alteration by JACS: keep normal Windows behaviour (float on top of parent) + // with this style. + if ((m_windowStyle & wxFRAME_FLOAT_ON_PARENT) == 0) + parent = NULL; + + MSWCreate(m_windowId, parent, wxFrameClassName, this, title, x, y, width, height, style); wxModelessWindows.Append(this); @@ -916,7 +922,16 @@ void wxFrame::ProcessCommand(int id) { bar->Check(id,!bar->Checked(id)) ; } - GetEventHandler()->ProcessEvent(commandEvent); + +/* + // Process events starting with the window with the focus, if any. + wxWindow* focusWin = wxFindFocusDescendant(this); + + wxEvtHandler* evtHandler = focusWin ? focusWin->GetEventHandler() : GetEventHandler(); +*/ + + wxEvtHandler* evtHandler = GetEventHandler(); + evtHandler->ProcessEvent(commandEvent); } // Checks if there is a toolbar, and returns the first free client position