Tests: Mir needs the window to swap at lease 1 frame for the cursor to show. So render in testwm2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
diff --git a/test/testwm2.c b/test/testwm2.c
index 94ba513..cd19e9f 100644
--- a/test/testwm2.c
+++ b/test/testwm2.c
@@ -50,6 +50,7 @@ quit(int rc)
void
loop()
{
+ int i;
SDL_Event event;
/* Check for events */
while (SDL_PollEvent(&event)) {
@@ -100,6 +101,12 @@ loop()
}
}
}
+
+ for (i = 0; i < state->num_windows; ++i) {
+ SDL_Renderer *renderer = state->renderers[i];
+ SDL_RenderClear(renderer);
+ SDL_RenderPresent(renderer);
+ }
#ifdef __EMSCRIPTEN__
if (done) {
emscripten_cancel_main_loop();
@@ -122,7 +129,6 @@ main(int argc, char *argv[])
if (!state) {
return 1;
}
- state->skip_renderer = SDL_TRUE;
for (i = 1; i < argc;) {
int consumed;
@@ -140,6 +146,12 @@ main(int argc, char *argv[])
quit(2);
}
+ for (i = 0; i < state->num_windows; ++i) {
+ SDL_Renderer *renderer = state->renderers[i];
+ SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);
+ SDL_RenderClear(renderer);
+ }
+
/* Main render loop */
done = 0;
#ifdef __EMSCRIPTEN__