X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fwayland.cpp;h=e7ba1573d16d533407fcd59986009aed7848e865;hb=8c712205657ceceb8644065735b5fff06bedfbb5;hp=3162d4eb0f02709b6c178cc2c0400c6e2f1bc0ae;hpb=1a4f20e844123e3b77e4bd25e8d588e50bde664f;p=staging%2Fwindowmanager.git diff --git a/src/wayland.cpp b/src/wayland.cpp index 3162d4e..e7ba157 100644 --- a/src/wayland.cpp +++ b/src/wayland.cpp @@ -18,17 +18,8 @@ namespace wl { // |_| |___/ display::display() : d(std::unique_ptr( - wl_display_connect(nullptr), -#ifdef DEBUG_OUTPUT - [](struct wl_display *d) { - logdebug("wl::display ~display @ %p", d); - wl_display_disconnect(d); - })), -#else - &wl_display_disconnect)), -#endif - r(d.get()) { -} + wl_display_connect(nullptr), &wl_display_disconnect)), + r(d.get()) {} bool display::ok() const { return d && wl_display_get_error(d.get()) == 0; } @@ -727,6 +718,29 @@ void controller::execute_pending() { } } +void controller::debug_dump_current_status() { + if (!this->surfaces.empty()) { + puts("Surfaces:"); + for (auto const &i : this->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 (!this->layers.empty()) { + puts("Layers:"); + for (auto const &i : this->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 "); + } +} // // ___ ___ _ __ ___ ___ _ __ // / __|/ __| '__/ _ \/ _ \ '_ \