MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / hideApp

Method hideApp

Tactility/Source/service/gui/GuiService.cpp:259–279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

257}
258
259void GuiService::hideApp() {
260 auto lock = mutex.asScopedLock();
261 lock.lock();
262
263 if (!isStarted) {
264 LOGGER.error("Failed to hide app: GUI not started");
265 return;
266 }
267
268 if (appToRender == nullptr) {
269 LOGGER.warn("hideApp() called but no app is currently shown");
270 return;
271 }
272
273 // We must lock the LVGL port, because the viewport hide callbacks
274 // might call LVGL APIs (e.g. to remove the keyboard from the screen root)
275 lvgl::lock(portMAX_DELAY);
276 appToRender->getApp()->onHide(*appToRender);
277 lvgl::unlock();
278 appToRender = nullptr;
279}
280
281std::shared_ptr<GuiService> findService() {
282 return std::static_pointer_cast<GuiService>(

Callers

nothing calls this directly

Calls 8

asScopedLockMethod · 0.80
errorMethod · 0.80
warnMethod · 0.80
getAppMethod · 0.80
lockFunction · 0.50
unlockFunction · 0.50
lockMethod · 0.45
onHideMethod · 0.45

Tested by

no test coverage detected