summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/app.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/app.cpp b/src/app.cpp
index a59adba..26dc5f6 100644
--- a/src/app.cpp
+++ b/src/app.cpp
@@ -491,13 +491,19 @@ result<int> App::request_surface(char const *drawing_name) {
}
void App::activate(unsigned id) {
- this->controller->surfaces[id]->set_visibility(1);
- this->emit_activated(this->lookup_name(id).value_or("unknown-name").c_str());
+ if (this->controller->sprops[id].visibility == 0) {
+ this->controller->surfaces[id]->set_visibility(1);
+ this->emit_activated(
+ this->lookup_name(id).value_or("unknown-name").c_str());
+ }
}
void App::deactivate(unsigned id) {
- this->controller->surfaces[id]->set_visibility(0);
- this->emit_deactivated(this->lookup_name(id).value_or("unknown-name").c_str());
+ if (this->controller->sprops[id].visibility != 0) {
+ this->controller->surfaces[id]->set_visibility(0);
+ this->emit_deactivated(
+ this->lookup_name(id).value_or("unknown-name").c_str());
+ }
}
// _ _ _ _ _ _ _