LibGUI: Added window creation callback to GApplication/GWindow

Added a window creation callback to GApplication that gets called
by GWindow which will reset any pending exit request in the
CEventLoop.

This is to prevent a bug which prevents your application from
starting up if you had a message box or other dialog before
showing your main application form. The bug was triggered by
there being no more visible windows which was triggering a
premature quit().
This commit is contained in:
Brandon Scott 2019-10-25 00:23:35 -05:00 committed by Andreas Kling
commit 51e655f903
Notes: sideshowbarker 2024-07-19 11:32:49 +09:00
3 changed files with 8 additions and 0 deletions

View file

@ -33,6 +33,7 @@ public:
bool quit_when_last_window_deleted() const { return m_quit_when_last_window_deleted; }
void set_quit_when_last_window_deleted(bool b) { m_quit_when_last_window_deleted = b; }
void did_create_window(Badge<GWindow>);
void did_delete_last_window(Badge<GWindow>);
const String& invoked_as() const { return m_invoked_as; }