Add a monotonically incrementing counter to UpdateWindows calls

This is for checking draw cache validity
This commit is contained in:
Jonathan G Rennison
2018-01-18 20:00:20 +00:00
parent 4bad77cdf0
commit 8ab6522e7c
3 changed files with 20 additions and 0 deletions

View File

@@ -59,6 +59,8 @@ Window *_z_back_window = NULL;
/** If false, highlight is white, otherwise the by the widget defined colour. */
bool _window_highlight_colour = false;
uint64 _window_update_number = 1;
/*
* Window that currently has focus. - The main purpose is to generate
* #FocusLost events, not to give next window in z-order focus when a
@@ -3096,6 +3098,8 @@ void UpdateWindows()
{
Window *w;
_window_update_number++;
static int highlight_timer = 1;
if (--highlight_timer == 0) {
highlight_timer = 15;
@@ -3138,6 +3142,8 @@ void UpdateWindows()
NetworkDrawChatMessage();
/* Redraw mouse cursor in case it was hidden */
DrawMouseCursor();
_window_update_number++;
}
/**