node-mac-recorder 2.10.14 → 2.10.15

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.14",
3
+ "version": "2.10.15",
4
4
  "description": "Native macOS screen recording package for Node.js applications",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -124,12 +124,21 @@ void updateScreenOverlays();
124
124
  // Update global toggle state
125
125
  g_hasToggledWindow = self.isToggled;
126
126
 
127
- // Bring window to front if toggled
128
127
  if (self.isToggled && self.windowInfo) {
128
+ // Toggle activated - bring window to front
129
129
  int windowId = [[self.windowInfo objectForKey:@"id"] intValue];
130
130
  if (windowId > 0) {
131
131
  bringWindowToFront(windowId);
132
- NSLog(@"🔄 TOGGLED: Window brought to front - %@", [self.windowInfo objectForKey:@"title"]);
132
+ NSLog(@"🔄 TOGGLED ON: Window brought to front - %@", [self.windowInfo objectForKey:@"title"]);
133
+ }
134
+ } else if (!self.isToggled) {
135
+ // Toggle deactivated - clear state and force overlay refresh
136
+ NSLog(@"🔄 TOGGLED OFF: Clearing lock state for fresh tracking");
137
+
138
+ // Force next overlay update by clearing current window data
139
+ if (g_currentWindowUnderCursor) {
140
+ [g_currentWindowUnderCursor release];
141
+ g_currentWindowUnderCursor = nil;
133
142
  }
134
143
  }
135
144
 
@@ -518,7 +527,7 @@ void updateOverlay() {
518
527
  int deltaX = abs(newX - oldX);
519
528
  int deltaY = abs(newY - oldY);
520
529
 
521
- if (deltaX >= 3 || deltaY >= 3) {
530
+ if (deltaX >= 5 || deltaY >= 5) {
522
531
  // Significant position change - update
523
532
  needsUpdate = YES;
524
533
  targetWindow = freshWindowData;
@@ -562,7 +571,7 @@ void updateOverlay() {
562
571
  int deltaX = abs(newX - oldX);
563
572
  int deltaY = abs(newY - oldY);
564
573
 
565
- if (deltaX >= 3 || deltaY >= 3) {
574
+ if (deltaX >= 5 || deltaY >= 5) {
566
575
  // Significant position change - update
567
576
  needsUpdate = YES;
568
577
  targetWindow = freshWindowData;