fix(color): full screen widget may not exit cleanly after calling lcd.exitFullScreen() (#5544)

This commit is contained in:
philmoz
2024-09-19 18:05:08 +10:00
committed by GitHub
parent 6563cd20d0
commit edb04cc833
3 changed files with 9 additions and 5 deletions
+2 -5
View File
@@ -1410,11 +1410,8 @@ Exit full screen widget mode.
*/
static int luaLcdExitFullScreen(lua_State *L)
{
if (runningFS) {
auto rfs = runningFS;
runningFS = nullptr;
rfs->setFullscreen(false);
}
if (runningFS)
runningFS->closeFullscreen();
return 0;
}
+5
View File
@@ -260,6 +260,11 @@ void LuaWidget::checkEvents()
{
Widget::checkEvents();
if (closeFS) {
closeFS = false;
setFullscreen(false);
}
// Call update once after widget first created
if (!created) {
created = true;