mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-27 01:50:24 +00:00
Assistant: Quit the application after losing focus
Prior to this change, Assistant would just stay in the background, unless one pressed an Escape key or launched some app.
This commit is contained in:
parent
ac21c6625d
commit
64ca51265d
Notes:
sideshowbarker
2024-07-19 17:20:26 +09:00
Author: https://github.com/krkk Commit: https://github.com/SerenityOS/serenity/commit/64ca51265dc Pull-request: https://github.com/SerenityOS/serenity/pull/9212 Reviewed-by: https://github.com/awesomekling
1 changed files with 4 additions and 0 deletions
|
@ -280,6 +280,10 @@ int main(int argc, char** argv)
|
|||
text_box.on_escape_pressed = []() {
|
||||
GUI::Application::the()->quit();
|
||||
};
|
||||
window->on_active_window_change = [](bool is_active_window) {
|
||||
if (!is_active_window)
|
||||
GUI::Application::the()->quit();
|
||||
};
|
||||
|
||||
db.on_new_results = [&](auto results) {
|
||||
if (results.is_empty())
|
||||
|
|
Loading…
Reference in a new issue