overlay always interactive when idle, click-through only during recording
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user