static void
view_handle_surface_commit(struct wl_listener *listener, void *data)
{
+ static unsigned int seedx = 1;
+ static unsigned int seedy = 43210;
struct tinyds_view *view;
struct ds_buffer *buffer;
int w = 0, h = 0;
ds_buffer_get_size(buffer, &w, &h);
- view->x = rand() % (OUTPUT_WIDTH - w);
- view->y = rand() % (OUTPUT_HEIGHT - h);
+ view->x = rand_r(&seedx) % (OUTPUT_WIDTH - w);
+ view->y = rand_r(&seedy) % (OUTPUT_HEIGHT - h);
}
output_damage(view->server->output);