mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-31 22:25:25 -04:00
Handle multiple clients better.
This commit is contained in:
parent
16eb675399
commit
f921289954
5 changed files with 168 additions and 45 deletions
8
client.c
8
client.c
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue