Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(desktop-gpui): leave Linux on its clean-capture main window restore

Richie McIlroy6621761cb35b
diff --git a/apps/desktop-gpui/src/app_windows.rs b/apps/desktop-gpui/src/app_windows.rs
index 6d9c3b599..d89ae7d38 100644
--- a/apps/desktop-gpui/src/app_windows.rs
+++ b/apps/desktop-gpui/src/app_windows.rs
@@ -664,7 +664,10 @@ pub fn init(main: WindowHandle<MainWindow>, session: Entity<RecordingSession>, c
// the completion and Cap stays out of the way.
let settings = crate::store::GeneralSettings::load();
let behaviour = settings.post_studio_recording_behaviour;
- let keep_hidden_after_instant = finished_instant
+ // Linux restores the main window through the clean-capture
+ // lease before this runs, so it keeps reshowing as before.
+ let keep_hidden_after_instant = cfg!(not(target_os = "linux"))
+ && finished_instant
&& settings.post_instant_behaviour()
!= crate::store::PostInstantBehaviour::ShowCap;
match (finished_studio, behaviour) {