mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:27:35 +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
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…
Add table
Add a link
Reference in a new issue