Reset spinner when going back to launcher

This commit is contained in:
Patrick Nicolas
2026-02-04 10:46:58 +01:00
parent 3285a485e8
commit 363b487d74
4 changed files with 8 additions and 2 deletions
+1 -2
View File
@@ -116,8 +116,7 @@ app_launcher::clicked app_launcher::draw_gui(imgui_context & imgui_ctx, const st
auto res = clicked::None;
auto t0 = std::chrono::steady_clock::now();
bool app_starting = start_time != std::chrono::steady_clock::time_point{} and
t0 - start_time < 10s and
stream.current_state() != scenes::stream::state::streaming;
t0 - start_time < 10s;
auto cancel_size = ImGui::CalcTextSize(cancel.c_str());
+5
View File
@@ -60,6 +60,11 @@ public:
// cancel: text to display on the quit/disconnect/cancel button
clicked draw_gui(imgui_context &, const std::string & cancel);
void reset()
{
start_time = {};
}
void operator()(wivrn::to_headset::application_list && apps);
void operator()(wivrn::to_headset::application_icon && icon);
};
+1
View File
@@ -526,6 +526,7 @@ void scenes::stream::on_unfocused()
clear_swapchains();
left_hand.reset();
right_hand.reset();
apps.reset();
imgui_ctx.reset();
}
+1
View File
@@ -979,6 +979,7 @@ void scenes::stream::draw_gui(XrTime predicted_display_time, XrDuration predicte
if (RadioButtonWithoutCheckBox(ICON_FA_ROCKET " " + _("Start"), gui_status, gui_status::application_launcher, {tab_width, 0}))
{
apps.reset();
network_session->send_control(from_headset::get_application_list{
.language = application::get_messages_info().language,
.country = application::get_messages_info().country,