Always poll on display fd so we only read when there's data.

This commit is contained in:
Kristian Høgsberg 2008-11-02 17:22:39 -05:00
parent 6b5e7626f5
commit 2a20d83fdb
2 changed files with 29 additions and 7 deletions

View file

@ -126,6 +126,10 @@ int main(int argc, char *argv[])
display = wl_display_create(socket_name,
connection_update, &p[0]);
if (display == NULL) {
fprintf(stderr, "failed to create display: %m\n");
return -1;
}
p[0].fd = wl_display_get_fd(display);
surface = wl_display_create_surface(display);