node-mac-recorder 2.10.12 → 2.10.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-mac-recorder",
3
- "version": "2.10.12",
3
+ "version": "2.10.13",
4
4
  "description": "Native macOS screen recording package for Node.js applications",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -501,33 +501,28 @@ void updateOverlay() {
501
501
  if (windowUnderCursor) {
502
502
  // Check if we're in lock mode (toggled window)
503
503
  if (g_hasToggledWindow && g_currentWindowUnderCursor) {
504
- // Check if cursor moved to different window while locked
504
+ // In lock mode - only track toggled window position, ignore cursor
505
505
  int toggledWindowId = [[g_currentWindowUnderCursor objectForKey:@"id"] intValue];
506
- int cursorWindowId = [[windowUnderCursor objectForKey:@"id"] intValue];
506
+ NSArray *allWindows = getAllSelectableWindows();
507
+ NSDictionary *freshWindowData = allWindows ?
508
+ [[allWindows filteredArrayUsingPredicate:
509
+ [NSPredicate predicateWithFormat:@"id == %d", toggledWindowId]] firstObject] : nil;
507
510
 
508
- if (toggledWindowId != cursorWindowId) {
509
- // Cursor moved to different window - cancel toggle and switch to new window
510
- NSLog(@"🔓 TOGGLE CANCELLED: Cursor moved to different window");
511
- g_hasToggledWindow = NO;
511
+ if (freshWindowData && ![freshWindowData isEqualToDictionary:g_currentWindowUnderCursor]) {
512
+ // Toggled window position changed - update
512
513
  needsUpdate = YES;
513
- targetWindow = windowUnderCursor;
514
+ targetWindow = freshWindowData;
515
+ NSLog(@"📍 TOGGLED WINDOW MOVED: Updating overlay position");
514
516
  } else {
515
- // Same window - check for position changes
516
- NSArray *allWindows = getAllSelectableWindows();
517
- NSDictionary *freshWindowData = allWindows ?
518
- [[allWindows filteredArrayUsingPredicate:
519
- [NSPredicate predicateWithFormat:@"id == %d", toggledWindowId]] firstObject] : nil;
520
-
521
- if (freshWindowData && ![freshWindowData isEqualToDictionary:g_currentWindowUnderCursor]) {
522
- // Toggled window position changed - update
523
- needsUpdate = YES;
524
- targetWindow = freshWindowData;
525
- NSLog(@"📍 TOGGLED WINDOW MOVED: Updating overlay position");
526
- } else {
527
- // No change needed
528
- needsUpdate = NO;
529
- targetWindow = g_currentWindowUnderCursor;
530
- }
517
+ // No change needed for toggled window
518
+ needsUpdate = NO;
519
+ targetWindow = g_currentWindowUnderCursor;
520
+ }
521
+
522
+ // Log cursor movement but don't act on it
523
+ int cursorWindowId = [[windowUnderCursor objectForKey:@"id"] intValue];
524
+ if (toggledWindowId != cursorWindowId) {
525
+ NSLog(@"🔒 LOCK ACTIVE: Cursor on different window but keeping toggle");
531
526
  }
532
527
  } else if (!g_currentWindowUnderCursor ||
533
528
  ![windowUnderCursor isEqualToDictionary:g_currentWindowUnderCursor]) {