diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-07-23 18:20:00 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-07-23 18:20:00 +0200 |
commit | 72a3f69df77465049387764bf29c0d0a92803a43 (patch) | |
tree | 160ded21347010299cdb887aa27cc4e3367b5846 /Libraries/LibGUI | |
parent | fbae03b73757ed07070c88a1f6b20915cb434cbb (diff) | |
download | serenity-72a3f69df77465049387764bf29c0d0a92803a43.zip |
LibGUI: Get rid of GWindow::should_exit_event_loop_on_close().
This behavior and API was extremely counter-intuitive since our default
behavior was for applications to never exit after you close all of their
windows.
Now that we exit the event loop by default when the very last GWindow is
deleted, we don't have to worry about this.
Diffstat (limited to 'Libraries/LibGUI')
-rw-r--r-- | Libraries/LibGUI/GDialog.cpp | 2 | ||||
-rw-r--r-- | Libraries/LibGUI/GWindow.cpp | 2 | ||||
-rw-r--r-- | Libraries/LibGUI/GWindow.h | 4 |
3 files changed, 1 insertions, 7 deletions
diff --git a/Libraries/LibGUI/GDialog.cpp b/Libraries/LibGUI/GDialog.cpp index 4de55f8c95..7438e41b2e 100644 --- a/Libraries/LibGUI/GDialog.cpp +++ b/Libraries/LibGUI/GDialog.cpp @@ -6,7 +6,7 @@ GDialog::GDialog(CObject* parent) : GWindow(parent) { set_modal(true); - set_should_exit_event_loop_on_close(true); + } GDialog::~GDialog() diff --git a/Libraries/LibGUI/GWindow.cpp b/Libraries/LibGUI/GWindow.cpp index eeff1bcb75..070fc5d42f 100644 --- a/Libraries/LibGUI/GWindow.cpp +++ b/Libraries/LibGUI/GWindow.cpp @@ -46,8 +46,6 @@ GWindow::~GWindow() void GWindow::close() { - if (should_exit_event_loop_on_close()) - GEventLoop::current().quit(0); if (should_destroy_on_close()) delete_later(); } diff --git a/Libraries/LibGUI/GWindow.h b/Libraries/LibGUI/GWindow.h index 5101a2430c..0ea7a15ce3 100644 --- a/Libraries/LibGUI/GWindow.h +++ b/Libraries/LibGUI/GWindow.h @@ -104,9 +104,6 @@ public: GWidget* automatic_cursor_tracking_widget() { return m_automatic_cursor_tracking_widget.ptr(); } const GWidget* automatic_cursor_tracking_widget() const { return m_automatic_cursor_tracking_widget.ptr(); } - bool should_exit_event_loop_on_close() const { return m_should_exit_app_on_close; } - void set_should_exit_event_loop_on_close(bool b) { m_should_exit_app_on_close = b; } - GWidget* hovered_widget() { return m_hovered_widget.ptr(); } const GWidget* hovered_widget() const { return m_hovered_widget.ptr(); } void set_hovered_widget(GWidget*); @@ -160,7 +157,6 @@ private: Color m_background_color { Color::WarmGray }; GWindowType m_window_type { GWindowType::Normal }; bool m_is_active { false }; - bool m_should_exit_app_on_close { false }; bool m_destroy_on_close { true }; bool m_has_alpha_channel { false }; bool m_double_buffering_enabled { true }; |