#include <json-c/json.h>
-#include <fstream>
-#include <json.hpp>
#include <bits/signum.h>
#include <csignal>
+#include <fstream>
+#include <json.hpp>
namespace wm {
display{d},
controller{},
outputs(),
- layouts(), //load_layout("../layout.json").unwrap()),
+ layouts(), // load_layout("../layout.json").unwrap()),
surface2layer(load_layer_ids("../ids.json").unwrap()) {
// layouts(load_layout("../layout.json").unwrap()) {
assert(g_app == nullptr);
if (h < 0) {
h = c->output_size.h + 1 + h;
}
- logdebug("Computed rect={ %d, %d, %d, %d }", x, y, w, h);
+ logdebug("Computed rect={ %d, %d, %d, %d }", x, y, w, h);
s->set_configuration(w, h);
s->set_source_rectangle(0, 0, w, h);
s->set_visibility(1);
c->layers[layer_id]->add_surface(s.get());
- logdebug("Surface %u now on layer %u", surface_id,
- layer_id);
+ logdebug("Surface %u now on layer %u", surface_id, layer_id);
});
}
}
binding_api::result_type binding_api::debug_terminate() {
logdebug("%s", __func__);
- raise(SIGKILL); // XXX afb-daemon kills it's pgroup using TERM, which doesn't play well with perf
+ raise(SIGKILL); // XXX afb-daemon kills it's pgroup using TERM, which
+ // doesn't play well with perf
return Ok(json_object_new_object());
}
if (j["area"]["type"] == "rect") {
auto jr = j["area"]["rect"];
this->rect = genivi::rect{
- get<int32_t>(jr["width"]),
- get<int32_t>(jr["height"]),
- get<int32_t>(jr["x"]),
- get<int32_t>(jr["y"]),
+ get<int32_t>(jr["width"]), get<int32_t>(jr["height"]),
+ get<int32_t>(jr["x"]), get<int32_t>(jr["y"]),
};
}
}
}
namespace {
-optional<surface_id_to_layer> get_surface_id_to_layer(struct surface_id_to_layer_map const *s2l, int surface_id) {
- auto i = std::lower_bound(std::cbegin(s2l->mapping),
- std::cend(s2l->mapping), surface_id);
+optional<surface_id_to_layer> get_surface_id_to_layer(
+ struct surface_id_to_layer_map const *s2l, int surface_id) {
+ auto i = std::lower_bound(std::cbegin(s2l->mapping), std::cend(s2l->mapping),
+ surface_id);
if (i != s2l->mapping.end()) {
// std::less only checks for surface_id_to_layer::id_max, so check
return e ? optional<int>(e->layer_id) : nullopt;
}
-optional<genivi::rect> surface_id_to_layer_map::get_rect_for_surface(int surface_id) {
+optional<genivi::rect> surface_id_to_layer_map::get_rect_for_surface(
+ int surface_id) {
auto e = get_surface_id_to_layer(this, surface_id);
return e ? optional<genivi::rect>(e->rect) : nullopt;
}