From f8e888c8325cc16ace81df404df930d750e75116 Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Wed, 17 Aug 2022 09:19:25 +0200 Subject: [PATCH] [fix, SDL] Remove useless Device call from exit (#9443) Fixes #9439. --- frontend/device/input.lua | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/frontend/device/input.lua b/frontend/device/input.lua index d36a10e67..f8ad4e47d 100644 --- a/frontend/device/input.lua +++ b/frontend/device/input.lua @@ -547,14 +547,9 @@ function Input:handleKeyBoardEv(ev) -- quit on Alt + F4 -- this is also emitted by the close event in SDL if self:isEvKeyPress(ev) and self.modifiers["Alt"] and keycode == "F4" then - local Device = require("frontend/device") local UIManager = require("ui/uimanager") - - local save_quit = function() - Device:saveSettings() - UIManager:quit() - end - UIManager:broadcastEvent(Event:new("Exit", save_quit)) + UIManager:broadcastEvent(Event:new("Close")) -- Tell all widgets to close. + UIManager:nextTick(function() UIManager:quit() end) -- Ensure the program closes in case of some lingering dialog. end -- handle modifier keys