overlay always interactive when idle, click-through only during recording

This commit is contained in:
2026-05-29 16:42:27 +03:00
parent 83c31b0d63
commit 21898a6d6a
+11
View File
@@ -802,10 +802,21 @@ fn start_overlay_clickthrough_poll(app: AppHandle, shutdown: Arc<AtomicBool>) {
// During recording, the overlay should always be click-through.
// start_capture already sets ignore_cursor_events(true). Skip polling
// so we don't fight it.
// When not recording, the overlay must be interactive (close button, drag, etc).
let state = app.state::<AppState>();
let is_recording = lock(&state.capture).is_some();
if is_recording {
if last_inner != Some(true) {
let _ = overlay.set_ignore_cursor_events(true);
last_inner = Some(true);
}
continue;
} else {
// Not recording - overlay must be interactive
if last_inner != Some(false) {
let _ = overlay.set_ignore_cursor_events(false);
last_inner = Some(false);
}
continue;
}