7
WsDisplay *dpy1, *dpy2;
8
WsSyncCounter *counter1, *counter2;
12
dpy1 = ws_display_new (NULL);
13
dpy2 = ws_display_new (NULL);
15
ws_display_init_sync (dpy1);
16
ws_display_init_sync (dpy2);
18
counter1 = ws_sync_counter_new (dpy1, 10);
19
counter2 = ws_sync_counter_ensure (dpy2, WS_RESOURCE_XID (counter1));
21
ws_display_sync (dpy1);
23
ws_sync_counter_await (counter1, 11);
25
ws_sync_counter_change (counter2, 1);
27
g_print ("value: %lld\n", ws_sync_counter_query_value (counter2));
29
ws_display_sync (dpy1);
31
g_print ("success\n");