diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-03-19 00:01:02 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-03-19 00:01:02 +0100 |
commit | 57ff293a51d97742d50987950c86dfcde55e6ad1 (patch) | |
tree | 44cb31375a62808be2b743758bc6c42c574b4afa /Applications/TextEditor | |
parent | 55aa8190773721f1dc0a3f49bedea6ed8524b318 (diff) | |
download | serenity-57ff293a51d97742d50987950c86dfcde55e6ad1.zip |
LibGUI: Implement nested event loops to support dialog boxes.
This patch adds a simple GMessageBox that can run in a nested event loop.
Here's how you use it:
GMessageBox box("Message text here", "Message window title");
int result = box.exec();
The next step is to make the WindowServer respect the modality flag of
these windows and prevent interaction with other windows in the same
process until the modal window has been closed.
Diffstat (limited to 'Applications/TextEditor')
-rw-r--r-- | Applications/TextEditor/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Applications/TextEditor/main.cpp b/Applications/TextEditor/main.cpp index 4df7073241..16023de124 100644 --- a/Applications/TextEditor/main.cpp +++ b/Applications/TextEditor/main.cpp @@ -136,7 +136,7 @@ int main(int argc, char** argv) window->set_title(String::format("TextEditor: %s", path.characters())); window->set_rect(20, 200, 640, 400); window->set_main_widget(widget); - window->set_should_exit_app_on_close(true); + window->set_should_exit_event_loop_on_close(true); text_editor->set_focus(true); window->show(); |