Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Window::poll_events() {
- while (wl_display_prepare_read(_display.get())) {
- wl_display_dispatch_pending(_display.get());
- }
- while (wl_display_flush(_display.get()) < 0 && errno == EAGAIN) {
- }
- wl_display_read_events(_display.get());
- wl_display_dispatch_pending(_display.get());
- if (wl_display_get_error(_display.get())) {
- throw std::runtime_error("Wayland protocol error");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement