summaryrefslogtreecommitdiffstats
path: root/src/wayland.cpp
diff options
context:
space:
mode:
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-06-30 13:06:25 +0200
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-08-08 17:24:00 +0200
commit18cc724bb76a6b2b6e9607ce6658cb9cc8f7ec0d (patch)
treede446173c94cc9e98106146c52dcb900cf404c51 /src/wayland.cpp
parent22cf0bf96f4a94f5fbfec6f5dfc3adeb5b66e7ac (diff)
main: better check_events implementation
* Introduced helper struct Poller * Implements check_events() and calls custom handlers on POLLIN. * Moved status dump to genivi::controller. Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
Diffstat (limited to 'src/wayland.cpp')
-rw-r--r--src/wayland.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/wayland.cpp b/src/wayland.cpp
index 62c1afe..e7ba157 100644
--- a/src/wayland.cpp
+++ b/src/wayland.cpp
@@ -718,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 ");
+ }
+}
//
// ___ ___ _ __ ___ ___ _ __
// / __|/ __| '__/ _ \/ _ \ '_ \