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 +1 -1
- package/src/window_selector.mm +18 -23
package/package.json
CHANGED
package/src/window_selector.mm
CHANGED
|
@@ -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
|
-
//
|
|
504
|
+
// In lock mode - only track toggled window position, ignore cursor
|
|
505
505
|
int toggledWindowId = [[g_currentWindowUnderCursor objectForKey:@"id"] intValue];
|
|
506
|
-
|
|
506
|
+
NSArray *allWindows = getAllSelectableWindows();
|
|
507
|
+
NSDictionary *freshWindowData = allWindows ?
|
|
508
|
+
[[allWindows filteredArrayUsingPredicate:
|
|
509
|
+
[NSPredicate predicateWithFormat:@"id == %d", toggledWindowId]] firstObject] : nil;
|
|
507
510
|
|
|
508
|
-
if (
|
|
509
|
-
//
|
|
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 =
|
|
514
|
+
targetWindow = freshWindowData;
|
|
515
|
+
NSLog(@"📍 TOGGLED WINDOW MOVED: Updating overlay position");
|
|
514
516
|
} else {
|
|
515
|
-
//
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
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]) {
|