diff options
Diffstat (limited to 'src/ui/window.c')
-rw-r--r-- | src/ui/window.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ui/window.c b/src/ui/window.c index 9d372019..90588ccf 100644 --- a/src/ui/window.c +++ b/src/ui/window.c | |||
@@ -471,16 +471,17 @@ void init_Window(iWindow *d, enum iWindowType type, iRect rect, uint32_t flags) | |||
471 | d->isMinimized = iFalse; | 471 | d->isMinimized = iFalse; |
472 | d->isInvalidated = iFalse; /* set when posting event, to avoid repeated events */ | 472 | d->isInvalidated = iFalse; /* set when posting event, to avoid repeated events */ |
473 | d->isMouseInside = iTrue; | 473 | d->isMouseInside = iTrue; |
474 | set_Atomic(&d->isRefreshPending, iTrue); | ||
474 | d->ignoreClick = iFalse; | 475 | d->ignoreClick = iFalse; |
475 | d->focusGainedAt = SDL_GetTicks(); | 476 | d->focusGainedAt = SDL_GetTicks(); |
476 | d->presentTime = 0.0; | ||
477 | d->frameTime = SDL_GetTicks(); | 477 | d->frameTime = SDL_GetTicks(); |
478 | d->keyRoot = NULL; | 478 | d->keyRoot = NULL; |
479 | d->borderShadow = NULL; | 479 | d->borderShadow = NULL; |
480 | d->frameCount = 0; | ||
480 | iZap(d->roots); | 481 | iZap(d->roots); |
481 | iZap(d->cursors); | 482 | iZap(d->cursors); |
482 | create_Window_(d, rect, flags); | 483 | create_Window_(d, rect, flags); |
483 | /* No luck, maybe software only? This should always work as long as there is a display. */ | 484 | /* No luck, maybe software only? This should always work as long as there is a display. */ |
484 | // SDL_SetHint(SDL_HINT_RENDER_DRIVER, "software"); | 485 | // SDL_SetHint(SDL_HINT_RENDER_DRIVER, "software"); |
485 | // flags &= ~SDL_WINDOW_OPENGL; | 486 | // flags &= ~SDL_WINDOW_OPENGL; |
486 | // start_PerfTimer(create_Window_); | 487 | // start_PerfTimer(create_Window_); |
@@ -1430,7 +1431,11 @@ void draw_MainWindow(iMainWindow *d) { | |||
1430 | } | 1431 | } |
1431 | setCurrent_Root(NULL); | 1432 | setCurrent_Root(NULL); |
1432 | #if !defined (NDEBUG) | 1433 | #if !defined (NDEBUG) |
1433 | draw_Text(uiLabelBold_FontId, safeRect_Root(w->roots[0]).pos, red_ColorId, "%d", drawCount_); | 1434 | draw_Text(uiLabelBold_FontId, |
1435 | safeRect_Root(w->roots[0]).pos, | ||
1436 | d->base.frameCount & 1 ? red_ColorId : white_ColorId, | ||
1437 | "%d", | ||
1438 | drawCount_); | ||
1434 | drawCount_ = 0; | 1439 | drawCount_ = 0; |
1435 | #endif | 1440 | #endif |
1436 | } | 1441 | } |