Assistant: Fix lockfile logic

Previously, Assistant was able to re-execute itself due to a quirk in
the global cursor tracking logic, it seems.

Now it has become necessary to explicitly drop the lockfile before
activating the new Assistant instance.

Alternatively, this has always been a latent bug that only now has
become more likely.
This commit is contained in:
Ben Wiederhake 2021-09-07 21:35:36 +02:00 committed by Andreas Kling
parent dbc8465c20
commit 2f38cad987
Notes: sideshowbarker 2024-07-18 04:27:45 +09:00

View file

@ -244,6 +244,7 @@ int main(int argc, char** argv)
text_box.on_return_pressed = [&]() {
if (!app_state.selected_index.has_value())
return;
lockfile.release();
app_state.results[app_state.selected_index.value()].activate();
GUI::Application::the()->quit();
};