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:
Karol Kosek 2021-08-04 22:28:11 +02:00 committed by Andreas Kling
parent ac21c6625d
commit 64ca51265d
Notes: sideshowbarker 2024-07-19 17:20:26 +09:00

View file

@ -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())