| 3350 | |
| 3351 | template <> |
| 3352 | void Demo::run<WsiPlatform::xcb>() { |
| 3353 | xcb_flush(connection); |
| 3354 | |
| 3355 | while (!quit) { |
| 3356 | xcb_generic_event_t *event; |
| 3357 | |
| 3358 | if (pause) { |
| 3359 | event = xcb_wait_for_event(connection); |
| 3360 | } else { |
| 3361 | event = xcb_poll_for_event(connection); |
| 3362 | } |
| 3363 | while (event) { |
| 3364 | handle_xcb_event(event); |
| 3365 | free(event); |
| 3366 | event = xcb_poll_for_event(connection); |
| 3367 | } |
| 3368 | if (initialized && swapchain_ready) { |
| 3369 | draw(); |
| 3370 | if (!is_minimized) { |
| 3371 | curFrame++; |
| 3372 | } |
| 3373 | if (frameCount != UINT32_MAX && curFrame == frameCount) { |
| 3374 | quit = true; |
| 3375 | } |
| 3376 | } |
| 3377 | } |
| 3378 | } |
| 3379 | |
| 3380 | template <> |
| 3381 | void Demo::create_window<WsiPlatform::xcb>() { |
nothing calls this directly
no outgoing calls
no test coverage detected