Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 30 additions & 7 deletions src/backend/wayland/backend/state_init/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crate::{
capture::CaptureManager,
config::Config,
input::{InputState, state::CompositorCapabilities},
onboarding::OnboardingStore,
onboarding::{DEFERRED_HINT_REPEAT_MAX, OnboardingStore},
};

mod config;
Expand Down Expand Up @@ -54,13 +54,36 @@ pub(super) fn init_state(backend: &WaylandBackend, setup: WaylandSetup) -> Resul
};

let mut onboarding = OnboardingStore::load();
if !onboarding.state().welcome_shown {
// Start the guided tour for new users
input_state.start_tour();
onboarding.state_mut().welcome_shown = true;
onboarding.state_mut().tour_shown = true;
onboarding.save();
{
let state = onboarding.state_mut();
state.sessions_seen = state.sessions_seen.saturating_add(1);
// Re-arm deferred hints per session until each feature is actually used.
if !state.used_help_overlay && state.hint_help_count < DEFERRED_HINT_REPEAT_MAX {
state.hint_help_shown = false;
}
if !state.used_command_palette && state.hint_palette_count < DEFERRED_HINT_REPEAT_MAX {
state.hint_palette_shown = false;
}
if !state.used_radial_menu
&& !state.used_context_menu_right_click
&& !state.used_context_menu_keyboard
&& state.hint_quick_access_count < DEFERRED_HINT_REPEAT_MAX
{
state.hint_quick_access_shown = false;
}
if !state.first_run_completed && !state.first_run_skipped {
state
.active_step
.get_or_insert(crate::onboarding::FirstRunStep::WaitDraw);
} else {
state.active_step = None;
state.quick_access_requires_toolbar = false;
}
// Keep legacy flags marked so older checks never re-trigger.
state.welcome_shown = true;
state.tour_shown = true;
}
onboarding.save();
apply_initial_mode(backend, &config, &mut input_state);

let capture_manager = CaptureManager::new(backend.tokio_runtime.handle());
Expand Down
6 changes: 6 additions & 0 deletions src/backend/wayland/handlers/keyboard/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ impl KeyboardHandler for WaylandState {
return;
}
let key = keysym_to_key(event.keysym);
if matches!(key, Key::Escape)
&& self.input_state.modifiers.shift
&& self.try_skip_first_run_onboarding()
{
return;
}
if self.zoom.is_engaged() {
match key {
Key::Escape => {
Expand Down
Loading