diff options
author | Brandon Scott <xeons@users.noreply.github.com> | 2019-10-25 00:18:31 -0500 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-10-25 15:29:19 +0200 |
commit | 5311f8fae11cbc611abea61fda570a11ce3edee5 (patch) | |
tree | 505ada424102e31ea43c019deddb02ed4ce77c2d /Libraries | |
parent | f256c55e8d4b5448bbb9b91d0ef253d7ab574d20 (diff) | |
download | serenity-5311f8fae11cbc611abea61fda570a11ce3edee5.zip |
LibCore: Added unquit() method to CEventLoop.
Added an unquit() method to CEventLoop allowing you to cancel a
pending exit request.
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibCore/CEventLoop.cpp | 7 | ||||
-rw-r--r-- | Libraries/LibCore/CEventLoop.h | 1 |
2 files changed, 8 insertions, 0 deletions
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>, CNotifier&); void quit(int); + void unquit(); void take_pending_events_from(CEventLoop& other) { |