// Make it visible, no (or little effect) if already visible
auto &s = this->controller->surfaces[surface_id];
- s->set_visibility(1);
// Set all others invisible
for (auto &i: this->controller->surfaces) {
auto &si = this->controller->sprops[i.second->id];
- if (si.visibility == 1 && si.id != s->id && int(si.id) != this->layers.main_surface) {
+ if (si.visibility == 1 && si.id != s->id &&
+ int(si.id) != this->layers.main_surface) {
i.second->set_visibility(0);
}
}
+ s->set_visibility(1);
// commit changes
this->controller->commit_changes();
return Ok(json_object_new_object());
}
+binding_api::result_type binding_api::demo_activate_all() {
+ for (auto &s: this->app->controller->surfaces) {
+ s.second->set_visibility(1);
+ }
+ this->app->controller->commit_changes();
+ this->app->display->flush();
+ return Ok(json_object_new_object());
+}
+
// _ _ _ _ _
// ___ ___ _ __ | |_ _ __ ___ | | | ___ _ __ | |__ ___ ___ | | _____
// / __/ _ \| '_ \| __| '__/ _ \| | |/ _ \ '__|| '_ \ / _ \ / _ \| |/ / __|