X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fmain.cpp;h=c343a6672a9cf66613c0c6ba24176fde978ba30a;hb=ccad564c1621ba8aa69ce47ea9374da373b0bcce;hp=311631319ce2016ec0458c46fda31462a3a5c4be;hpb=3fc6d2e2cc8942e20ee57e6afb1d302ee1d35636;p=staging%2Fwindowmanager.git diff --git a/src/main.cpp b/src/main.cpp index 3116313..c343a66 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,7 +19,7 @@ namespace { // | (__| | | | __/ (__| < | __/\ V / __/ | | | |_\__ \ | | | // \___|_| |_|\___|\___|_|\_\___\___| \_/ \___|_| |_|\__|___/ | | | // |_____| \_\/_/ -int check_events(struct wl::display &d, struct conn *c, int fd) { +int check_events(struct wl::display &d, struct conn &c, int fd) { struct pollfd pfd[2] = {{.fd = d.get_fd(), .events = POLLIN, .revents = 0}, {.fd = fd, .events = POLLIN, .revents = 0}}; @@ -43,9 +43,9 @@ int check_events(struct wl::display &d, struct conn *c, int fd) { ; // Display current status - if (!c->c->surfaces.empty()) { + if (!c.c->surfaces.empty()) { puts("Surfaces:"); - for (auto const &i : c->c->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, @@ -54,9 +54,9 @@ int check_events(struct wl::display &d, struct conn *c, int fd) { puts("\b\b "); } - if (!c->c->layers.empty()) { + if (!c.c->layers.empty()) { puts("Layers:"); - for (auto const &i : c->c->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, @@ -152,7 +152,7 @@ int main(int argc, char **argv) { init_layout(c); - while (check_events(d, &c, STDIN_FILENO) != -1) { + while (check_events(d, c, STDIN_FILENO) != -1) { c.c->execute_pending(); d.flush(); }