fix(color): full screen widget may not exit cleanly after calling lcd.exitFullScreen() (#5544)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user