- if (fd != -1 && ((pfd[1].revents & POLLIN) != 0)) {
- char buf[256];
-
- // read all there is ...
- while (read(pfd[1].fd, buf, sizeof(buf)) == sizeof(buf)) {
- ;
- }
-
- // Display current status
- if (!c.c->surfaces.empty()) {
- puts("Surfaces:");
- for (auto const &i : c.c->surfaces) {
- auto const &r = i.second->dst_rect;
- auto const &s = i.second->size;
- printf("%d [%ux%u] (%ux%u@%dx%d), ", i.first, s.w, s.h, r.w, r.h,
- r.x, r.y);
- }
- puts("\b\b ");
- }
-
- if (!c.c->layers.empty()) {
- puts("Layers:");
- for (auto const &i : c.c->layers) {
- auto const &r = i.second->dst_rect;
- auto const &s = i.second->size;
- printf("%d [%ux%u] (%ux%u@%dx%d), ", i.first, s.w, s.h, r.w, r.h,
- r.x, r.y);
- }
- puts("\b\b ");
- }
- }
- }
-
- return 0;
-}
-
-// _ _ _ _ _ ____
-// (_)_ __ (_) |_ | | __ _ _ _ ___ _ _| |_ / /\ \
-// | | '_ \| | __| | |/ _` | | | |/ _ \| | | | __| | | |
-// | | | | | | |_ | | (_| | |_| | (_) | |_| | |_| | | |
-// |_|_| |_|_|\__|___|_|\__,_|\__, |\___/ \__,_|\__| | | |
-// |_____| |___/ \_\/_/
-void init_layout(struct conn &c) {
- auto &o = c.outputs.front();
- auto &s = c.c->screens.begin()->second;
- auto &layers = c.c->layers;
-
- // XXX: Write output dimensions to ivi controller...
- c.c->output_size = genivi::size{uint32_t(o->width), uint32_t(o->height)};