Handle multiple clients better.

This commit is contained in:
Kristian Høgsberg 2008-10-11 18:40:23 -04:00
parent 16eb675399
commit f921289954
5 changed files with 168 additions and 45 deletions

View file

@ -112,7 +112,7 @@ int main(int argc, char *argv[])
{
struct wl_display *display;
struct wl_surface *surface;
const int x = 200, y = 100, width = 300, height = 300;
const int x = 200, y = 200, width = 200, height = 200;
int fd, i, ret;
uint32_t name, mask;
cairo_surface_t *s;
@ -141,11 +141,11 @@ int main(int argc, char *argv[])
cairo_image_surface_get_stride(s));
i = 0;
while (ret = poll(p, 1, 20), ret >= 0) {
while (ret = poll(p, 1, 200), ret >= 0) {
if (ret == 0) {
wl_surface_map(surface,
x + cos(i / 10.0) * 50,
y + sin(i / 10.0) * 50,
x + cos(i / 10.0) * 150,
y + sin(i / 10.0) * 150,
width, height);
i++;
continue;