From 5311f8fae11cbc611abea61fda570a11ce3edee5 Mon Sep 17 00:00:00 2001 From: Brandon Scott Date: Fri, 25 Oct 2019 00:18:31 -0500 Subject: LibCore: Added unquit() method to CEventLoop. Added an unquit() method to CEventLoop allowing you to cancel a pending exit request. --- Libraries/LibCore/CEventLoop.cpp | 7 +++++++ Libraries/LibCore/CEventLoop.h | 1 + 2 files changed, 8 insertions(+) (limited to 'Libraries') diff --git a/Libraries/LibCore/CEventLoop.cpp b/Libraries/LibCore/CEventLoop.cpp index 17be63d020..425e18a678 100644 --- a/Libraries/LibCore/CEventLoop.cpp +++ b/Libraries/LibCore/CEventLoop.cpp @@ -186,6 +186,13 @@ void CEventLoop::quit(int code) m_exit_code = code; } +void CEventLoop::unquit() +{ + dbg() << "CEventLoop::unquit()"; + m_exit_requested = false; + m_exit_code = 0; +} + struct CEventLoopPusher { public: CEventLoopPusher(CEventLoop& event_loop) diff --git a/Libraries/LibCore/CEventLoop.h b/Libraries/LibCore/CEventLoop.h index d4de3fc211..5166b79093 100644 --- a/Libraries/LibCore/CEventLoop.h +++ b/Libraries/LibCore/CEventLoop.h @@ -45,6 +45,7 @@ public: static void unregister_notifier(Badge, CNotifier&); void quit(int); + void unquit(); void take_pending_events_from(CEventLoop& other) { -- cgit v1.2.3