X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/46d0c7072f075b56304470a66adbacce380d726e..8bebc229c7aa9a57fdb4b4955bbe23cd1a44f54a:/src/mac/toplevel.cpp diff --git a/src/mac/toplevel.cpp b/src/mac/toplevel.cpp index f5598a3c9f..67b1307bd7 100644 --- a/src/mac/toplevel.cpp +++ b/src/mac/toplevel.cpp @@ -242,7 +242,7 @@ static pascal OSStatus KeyboardEventHandler( EventHandlerCallRef handler , Event return result ; } -static pascal OSStatus MouseEventHandler( EventHandlerCallRef handler , EventRef event , void *data ) +pascal OSStatus MouseEventHandler( EventHandlerCallRef handler , EventRef event , void *data ) { OSStatus result = eventNotHandledErr ; @@ -267,7 +267,10 @@ static pascal OSStatus MouseEventHandler( EventHandlerCallRef handler , EventRef WindowRef window ; short windowPart = ::FindWindow(point, &window); - if ( IsWindowActive(window) && windowPart == inContent ) + // either we really are active or we are capturing mouse events + + if ( (IsWindowActive(window) && windowPart == inContent) || + (wxTheApp->s_captureWindow && wxTheApp->s_captureWindow->MacGetTopLevelWindow() == toplevelWindow) ) { switch ( GetEventKind( event ) ) { @@ -1067,12 +1070,13 @@ void wxTopLevelWindowMac::DoMoveWindow(int x, int y, int width, int height) { m_x = actualX ; m_y = actualY ; - m_width = actualWidth ; - m_height = actualHeight ; if ( doMove ) ::MoveWindow((WindowRef)m_macWindow, m_x, m_y , false); // don't make frontmost + m_width = actualWidth ; + m_height = actualHeight ; + if ( doResize ) ::SizeWindow((WindowRef)m_macWindow, m_width, m_height , true);