X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1afe4f9b47b9ee020cc21e12ed603409f60a59dc..db06cdc08cee40c72854d6a883cf017c2bcc670e:/src/common/event.cpp diff --git a/src/common/event.cpp b/src/common/event.cpp index 382b3ab50c..fcb917dae8 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -474,6 +474,13 @@ bool wxUpdateUIEvent::CanUpdate(wxWindowBase *win) ((win->GetExtraStyle() & wxWS_EX_PROCESS_UI_UPDATES) == 0))) return false; + // Don't update children of the hidden windows: this is useless as any + // change to their state won't be seen by the user anyhow. Notice that this + // argument doesn't apply to the hidden windows (with visible parent) + // themselves as they could be shown by their EVT_UPDATE_UI handler. + if ( win->GetParent() && !win->GetParent()->IsShownOnScreen() ) + return false; + if (sm_updateInterval == -1) return false;