revert clickthrough change, stop propagation on overlay buttons so startDragging doesn't intercept clicks

This commit is contained in:
2026-05-29 17:02:19 +03:00
parent 21898a6d6a
commit d08d464395
2 changed files with 3 additions and 17 deletions
+1 -15
View File
@@ -799,24 +799,10 @@ fn start_overlay_clickthrough_poll(app: AppHandle, shutdown: Arc<AtomicBool>) {
continue;
}
// 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);
}
last_inner = Some(true);
continue;
}