From 0c673801b78c98fe116b4d14bf37fb18f8b749dc Mon Sep 17 00:00:00 2001 From: Marcus Fritzsch Date: Mon, 10 Jul 2017 10:44:29 +0200 Subject: Track surface/layer properties with one struct As both share the exact same properties this makes sense, we now can write code once and work on both layer and surface properties. This however is only relevant in the wayland "level" of things, as in WM semantics layers are always fullscreen. Signed-off-by: Marcus Fritzsch --- src/main.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index ba0ff4e..965599d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -211,20 +211,20 @@ void debug_status(struct afb_req req) { auto o = json_object_new_object(); json_object_object_add(o, "surfaces", - to_json(g_wayland->controller->surfaces)); - json_object_object_add(o, "layers", to_json(g_wayland->controller->layers)); - json_object_object_add(o, "screens", - to_json(g_wayland->controller->screens)); + to_json(g_wayland->controller->sprops)); + json_object_object_add(o, "layers", to_json(g_wayland->controller->lprops)); +// json_object_object_add(o, "screens", +// to_json(g_wayland->controller->screens)); afb_req_success(req, o, "status"); } void debug_surfaces(afb_req req) { - afb_req_success(req, to_json(g_wayland->controller->surfaces), "surfaces"); + afb_req_success(req, to_json(g_wayland->controller->sprops), "surfaces"); } void debug_layers(afb_req req) { - afb_req_success(req, to_json(g_wayland->controller->layers), "layers"); + afb_req_success(req, to_json(g_wayland->controller->lprops), "layers"); } // Dummy register_surface implementation -- cgit 1.2.3-korg