X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad4297f34e21cea85219f3866d96c2622d5bb699..4d5a0f67c6f127ad08548494cdddc5c89bb27194:/src/msw/window.cpp diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 6be083a03d..e9acd3dc69 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -156,11 +156,8 @@ static void TranslateKbdEventToMouse(wxWindowMSW *win, // get the text metrics for the current font static TEXTMETRIC wxGetTextMetrics(const wxWindowMSW *win); -// check if the mouse is in the window or its child -static bool IsMouseInWindow(HWND hwnd); - // wrapper around BringWindowToTop() API -static inline wxBringWindowToTop(HWND hwnd) +static inline void wxBringWindowToTop(HWND hwnd) { #ifdef __WXMICROWIN__ // It seems that MicroWindows brings the _parent_ of the window to the top, @@ -3024,15 +3021,16 @@ bool wxWindowMSW::HandleEndSession(bool endSession, long logOff) if ( !endSession ) return FALSE; + // only send once + if ( (this != wxTheApp->GetTopWindow()) ) + return FALSE; + wxCloseEvent event(wxEVT_END_SESSION, -1); event.SetEventObject(wxTheApp); event.SetCanVeto(FALSE); event.SetLoggingOff( (logOff == (long)ENDSESSION_LOGOFF) ); - if ( (this == wxTheApp->GetTopWindow()) && // Only send once - wxTheApp->ProcessEvent(event)) - { - } - return TRUE; + + return wxTheApp->ProcessEvent(event); } // --------------------------------------------------------------------------- @@ -3195,7 +3193,8 @@ bool wxWindowMSW::HandleDropFiles(WXWPARAM wParam) wxDropFilesEvent event(wxEVT_DROP_FILES, gwFilesDropped, files); event.m_eventObject = this; - event.m_pos.x = dropPoint.x; event.m_pos.x = dropPoint.y; + event.m_pos.x = dropPoint.x; + event.m_pos.y = dropPoint.y; bool rc = GetEventHandler()->ProcessEvent(event);