summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-08-30 16:04:54 +0200
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-09-04 16:54:01 +0200
commit1191112d543676da171e38daf33909eb4f30aff3 (patch)
tree3d2f7a689acd140c3b05cd5ba616c8f1a87c4b09 /src
parent8acb8f5414b8ee257da670caad84239337ab8299 (diff)
app: visibility setting work around... peak software enfineering right here!!1
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
Diffstat (limited to 'src')
-rw-r--r--src/app.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/app.cpp b/src/app.cpp
index c672052..b3e8587 100644
--- a/src/app.cpp
+++ b/src/app.cpp
@@ -32,6 +32,7 @@
#include <bits/signum.h>
#include <csignal>
#include <fstream>
+#include <thread>
#include <json.hpp>
namespace wm {
@@ -341,8 +342,7 @@ char const *App::activate_surface(uint32_t surface_id) {
// 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.id != s->id && int(si.id) != this->layers.main_surface) {
i.second->set_visibility(0);
}
}
@@ -352,6 +352,17 @@ char const *App::activate_surface(uint32_t surface_id) {
this->controller->commit_changes();
this->display->flush();
+ auto set_vis = [&s, this](int id, int vis) {
+ using namespace std::chrono_literals;
+
+ std::this_thread::sleep_for(100ms);
+ s->set_visibility(vis);
+ this->controller->commit_changes();
+ this->display->roundtrip();
+ };
+ set_vis(s->id, 0);
+ set_vis(s->id, 1);
+
// Current active surface is the first in last_active
this->last_active.push_front(s->id);
/// // XXX: I am not sure I even need 5 elements...