refactoring SizeEvent sending

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2013-06-03 13:01:50 +00:00
parent cf83b0cfb6
commit c609b780c7
4 changed files with 5 additions and 19 deletions

View File

@@ -1244,9 +1244,6 @@ bool wxToolBar::Realize()
SetInitialSize( wxSize(m_minWidth, m_minHeight));
SendSizeEventToParent();
wxWindow * const parent = GetParent();
if ( parent && !parent->IsBeingDeleted() )
parent->MacOnInternalSize();
return true;
}

View File

@@ -1745,7 +1745,6 @@ void wxWidgetCocoaImpl::SetVisibility( bool visible )
wxUnusedVar(progress);
m_win->SendSizeEvent();
m_win->MacOnInternalSize();
}
- (void)animationDidEnd:(NSAnimation*)animation
@@ -1922,7 +1921,6 @@ wxWidgetCocoaImpl::ShowViewOrWindowWithEffect(wxWindow *win,
// refresh it once again after the end to ensure that everything is in
// place
win->SendSizeEvent();
win->MacOnInternalSize();
}
[anim setDelegate:nil];

View File

@@ -249,10 +249,7 @@ bool wxNonOwnedWindow::OSXShowWithEffect(bool show,
{
// as apps expect a size event to occur when the window is shown,
// generate one when it is shown with effect too
MacOnInternalSize();
wxSizeEvent event(GetSize(), m_windowId);
event.SetEventObject(this);
HandleWindowEvent(event);
SendSizeEvent();
}
return true;
@@ -312,11 +309,7 @@ void wxNonOwnedWindow::HandleActivated( double timestampsec, bool didActivate )
void wxNonOwnedWindow::HandleResized( double timestampsec )
{
MacOnInternalSize();
wxSizeEvent wxevent( GetSize() , GetId());
wxevent.SetTimestamp( (int) (timestampsec * 1000) );
wxevent.SetEventObject( this );
HandleWindowEvent(wxevent);
SendSizeEvent();
// we have to inform some controls that have to reset things
// relative to the toplevel window (e.g. OpenGL buffers)
wxWindowMac::MacSuperChangedPosition() ; // like this only children will be notified
@@ -387,10 +380,7 @@ bool wxNonOwnedWindow::Show(bool show)
if ( show )
{
// because apps expect a size event to occur at this moment
MacOnInternalSize();
wxSizeEvent event(GetSize() , m_windowId);
event.SetEventObject(this);
HandleWindowEvent(event);
SendSizeEvent();
}
return true ;

View File

@@ -187,7 +187,8 @@ void wxTopLevelWindowMac::ShowWithoutActivating()
m_nowpeer->ShowWithoutActivating();
// TODO: Should we call EVT_SIZE here?
// because apps expect a size event to occur at this moment
SendSizeEvent();
}
bool wxTopLevelWindowMac::ShowFullScreen(bool show, long style)