mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 08:58:11 +00:00
LibCore: Added unquit() method to CEventLoop.
Added an unquit() method to CEventLoop allowing you to cancel a pending exit request.
This commit is contained in:
parent
f256c55e8d
commit
5311f8fae1
2 changed files with 8 additions and 0 deletions
|
@ -186,6 +186,13 @@ void CEventLoop::quit(int code)
|
||||||
m_exit_code = code;
|
m_exit_code = code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CEventLoop::unquit()
|
||||||
|
{
|
||||||
|
dbg() << "CEventLoop::unquit()";
|
||||||
|
m_exit_requested = false;
|
||||||
|
m_exit_code = 0;
|
||||||
|
}
|
||||||
|
|
||||||
struct CEventLoopPusher {
|
struct CEventLoopPusher {
|
||||||
public:
|
public:
|
||||||
CEventLoopPusher(CEventLoop& event_loop)
|
CEventLoopPusher(CEventLoop& event_loop)
|
||||||
|
|
|
@ -45,6 +45,7 @@ public:
|
||||||
static void unregister_notifier(Badge<CNotifier>, CNotifier&);
|
static void unregister_notifier(Badge<CNotifier>, CNotifier&);
|
||||||
|
|
||||||
void quit(int);
|
void quit(int);
|
||||||
|
void unquit();
|
||||||
|
|
||||||
void take_pending_events_from(CEventLoop& other)
|
void take_pending_events_from(CEventLoop& other)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue