X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2ae3afa09f5c013cb2f6b4fb5c638cca1d8a5f13..8b7d411f1406c470e87be9ab225906ba7fd24aa2:/src/osx/window_osx.cpp diff --git a/src/osx/window_osx.cpp b/src/osx/window_osx.cpp index 3d355fde51..041c9d952e 100644 --- a/src/osx/window_osx.cpp +++ b/src/osx/window_osx.cpp @@ -897,22 +897,20 @@ wxSize wxWindowMac::DoGetBestSize() const r.width = r.height = 16 ; - if ( 0 ) - { - } #if wxUSE_SCROLLBAR - else if ( IsKindOf( CLASSINFO( wxScrollBar ) ) ) + if ( IsKindOf( CLASSINFO( wxScrollBar ) ) ) { r.height = 16 ; } + else #endif #if wxUSE_SPINBTN - else if ( IsKindOf( CLASSINFO( wxSpinButton ) ) ) + if ( IsKindOf( CLASSINFO( wxSpinButton ) ) ) { r.height = 24 ; } -#endif else +#endif { // return wxWindowBase::DoGetBestSize() ; } @@ -1060,6 +1058,22 @@ bool wxWindowMac::Show(bool show) if ( m_peer ) m_peer->SetVisibility( show ) ; + wxShowEvent eventShow(GetId(), show); + eventShow.SetEventObject(this); + + HandleWindowEvent(eventShow); + + return true; +} + +bool wxWindowMac::OSXShowWithEffect(bool show, + wxShowEffect effect, + unsigned timeout) +{ + if ( effect == wxSHOW_EFFECT_NONE || + !m_peer || !m_peer->ShowWithEffect(show, effect, timeout) ) + return Show(show); + return true; } @@ -1195,6 +1209,7 @@ wxWindow *wxGetActiveWindow() // Coordinates relative to the window void wxWindowMac::WarpPointer(int x_pos, int y_pos) { +#if wxOSX_USE_COCOA_OR_CARBON int x = x_pos; int y = y_pos; DoClientToScreen(&x, &y); @@ -1209,14 +1224,15 @@ void wxWindowMac::WarpPointer(int x_pos, int y_pos) event.m_altDown = mState.AltDown(); event.m_controlDown = mState.ControlDown(); - event.m_leftDown = mState.LeftDown(); - event.m_middleDown = mState.MiddleDown(); - event.m_rightDown = mState.RightDown(); + event.m_leftDown = mState.LeftIsDown(); + event.m_middleDown = mState.MiddleIsDown(); + event.m_rightDown = mState.RightIsDown(); event.m_metaDown = mState.MetaDown(); event.m_shiftDown = mState.ShiftDown(); event.SetId(GetId()); event.SetEventObject(this); GetEventHandler()->ProcessEvent(event); +#endif } int wxWindowMac::GetScrollPos(int orient) const @@ -1829,6 +1845,7 @@ bool wxWindowMac::MacDoRedraw( long time ) { case wxBG_STYLE_ERASE: case wxBG_STYLE_SYSTEM: + case wxBG_STYLE_COLOUR: { // for the toplevel window this really is the entire area for // all the others only their client area, otherwise they might @@ -1857,6 +1874,7 @@ bool wxWindowMac::MacDoRedraw( long time ) break; case wxBG_STYLE_PAINT: + case wxBG_STYLE_TRANSPARENT: // nothing to do, user-defined EVT_PAINT handler will overwrite the // entire window client area break;