Invalidate all windows again on DRAW_ALL_EVENT

Fixes #2159.
This commit is contained in:
Jyrki Vesterinen 2017-11-03 20:50:00 +02:00
parent 673c1fa4d9
commit 8279602d70

View file

@ -171,6 +171,7 @@ private:
/** Fires a draw event. */
using events::sdl_handler::draw;
void draw();
void draw_everything();
/**
* Fires a video resize event.
@ -381,8 +382,9 @@ void sdl_event_handler::handle_event(const SDL_Event& event)
case DRAW_EVENT:
draw();
break;
case DRAW_ALL_EVENT:
draw();
draw_everything();
break;
case TIMER_EVENT:
@ -540,6 +542,15 @@ void sdl_event_handler::draw()
}
}
void sdl_event_handler::draw_everything()
{
for(auto dispatcher : dispatchers_) {
dynamic_cast<widget&>(*dispatcher).set_is_dirty(true);
}
draw();
}
void sdl_event_handler::video_resize(const point& new_size)
{
DBG_GUI_E << "Firing: " << SDL_VIDEO_RESIZE << ".\n";