X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/30827629fa11f6365f69bd2917e1a35d22c35363..4e89ceb11ee28f55050dfc03c69e72cd84f98cdf:/src/msw/window.cpp diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 44fb41d769..23d1786d2b 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -1084,7 +1084,8 @@ WXDWORD wxWindowMSW::MSWGetStyle(long flags, WXDWORD *exstyle) const if ( flags & wxCLIP_SIBLINGS ) style |= WS_CLIPSIBLINGS; - if ( (flags & wxBORDER_MASK) != wxBORDER_NONE ) + wxBorder border = (wxBorder)(flags & wxBORDER_MASK); + if ( border != wxBORDER_NONE && border != wxBORDER_DEFAULT ) style |= WS_BORDER; // now deal with ext style if the caller wants it @@ -1103,6 +1104,7 @@ WXDWORD wxWindowMSW::MSWGetStyle(long flags, WXDWORD *exstyle) const case wxBORDER_NONE: case wxBORDER_SIMPLE: + case wxBORDER_DEFAULT: break; case wxBORDER_STATIC: @@ -1113,7 +1115,6 @@ WXDWORD wxWindowMSW::MSWGetStyle(long flags, WXDWORD *exstyle) const *exstyle |= WS_EX_WINDOWEDGE; break; - case wxBORDER_DEFAULT: case wxBORDER_SUNKEN: *exstyle |= WS_EX_CLIENTEDGE; break; @@ -1273,7 +1274,9 @@ void wxWindowMSW::OnIdle(wxIdleEvent& WXUNUSED(event)) // Check if we need to send a LEAVE event if ( m_mouseInWindow ) { - if ( !IsMouseInWindow() && !HasCapture()) + // note that we should generate the leave event whether the window has + // or doesn't have mouse capture + if ( !IsMouseInWindow() ) { // Generate a LEAVE event m_mouseInWindow = FALSE; @@ -5155,6 +5158,7 @@ wxPoint wxGetMousePosition() { POINT pt; GetCursorPos( & pt ); + return wxPoint(pt.x, pt.y); }