aboutsummaryrefslogtreecommitdiffstats
path: root/src/app.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.cpp')
-rw-r--r--src/app.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/app.cpp b/src/app.cpp
index 23d3a2c..0c2423e 100644
--- a/src/app.cpp
+++ b/src/app.cpp
@@ -542,6 +542,9 @@ void App::allocateWindowResource(char const *event, char const *drawing_name,
}
void App::enqueue_flushdraw(int surface_id) {
+ // lock by mutex
+ std::lock_guard<std::mutex> lock(this->mtx);
+
this->check_flushdraw(surface_id);
HMI_DEBUG("wm", "Enqueuing EndDraw for surface_id %d", surface_id);
this->pending_end_draw.push_back(surface_id);
@@ -562,6 +565,9 @@ void App::check_flushdraw(int surface_id) {
}
void App::api_enddraw(char const *appid, char const *drawing_name) {
+ // lock by mutex
+ std::lock_guard<std::mutex> lock(this->mtx);
+
// Convert drawing_name to role
const char* role = this->convertDrawingNameToRole(drawing_name);
@@ -965,6 +971,9 @@ void App::activate(int id) {
}
void App::deactivate(int id) {
+ // lock by mutex
+ std::lock_guard<std::mutex> lock(this->mtx);
+
auto ip = this->controller->sprops.find(id);
if (ip != this->controller->sprops.end()) {
char const *label =