Don't "tickle" a dialog until after it has had a chance to redraw itself,

otherwise it may be in an inconsistent state since the modern theme uses
openDialog() to allocate a surface as large as he dialog itself.

This fixes a crash when changing to a bigger scaler when the About dialog is
running.

svn-id: r22688
This commit is contained in:
Torbjörn Andersson 2006-05-27 22:57:00 +00:00
parent 3f3ac33e73
commit 7f1eafea96

View File

@ -162,8 +162,6 @@ void NewGui::runLoop() {
}
while (!_dialogStack.empty() && activeDialog == _dialogStack.top()) {
activeDialog->handleTickle();
if (_needRedraw) {
// Restore the overlay to its initial state, then draw all dialogs.
// This is necessary to get the blending right.
@ -188,6 +186,11 @@ void NewGui::runLoop() {
_needRedraw = false;
}
// Don't "tickle" the dialog until the theme has had a chance
// to re-allocate buffers in case of a scaler change.
activeDialog->handleTickle();
if (useStandardCurs)
animateCursor();
_theme->drawAll();