// | (__| | | | __/ (__| < | __/\ 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}};
;
// 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,
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,
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();
}