node-mac-recorder 2.10.13 → 2.10.14
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 +38 -8
package/package.json
CHANGED
package/src/window_selector.mm
CHANGED
|
@@ -509,10 +509,25 @@ void updateOverlay() {
|
|
|
509
509
|
[NSPredicate predicateWithFormat:@"id == %d", toggledWindowId]] firstObject] : nil;
|
|
510
510
|
|
|
511
511
|
if (freshWindowData && ![freshWindowData isEqualToDictionary:g_currentWindowUnderCursor]) {
|
|
512
|
-
//
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
512
|
+
// Check if position change is significant enough to update
|
|
513
|
+
int oldX = [[g_currentWindowUnderCursor objectForKey:@"x"] intValue];
|
|
514
|
+
int oldY = [[g_currentWindowUnderCursor objectForKey:@"y"] intValue];
|
|
515
|
+
int newX = [[freshWindowData objectForKey:@"x"] intValue];
|
|
516
|
+
int newY = [[freshWindowData objectForKey:@"y"] intValue];
|
|
517
|
+
|
|
518
|
+
int deltaX = abs(newX - oldX);
|
|
519
|
+
int deltaY = abs(newY - oldY);
|
|
520
|
+
|
|
521
|
+
if (deltaX >= 3 || deltaY >= 3) {
|
|
522
|
+
// Significant position change - update
|
|
523
|
+
needsUpdate = YES;
|
|
524
|
+
targetWindow = freshWindowData;
|
|
525
|
+
NSLog(@"📍 TOGGLED WINDOW MOVED: (%d,%d) → (%d,%d)", oldX, oldY, newX, newY);
|
|
526
|
+
} else {
|
|
527
|
+
// Minor change - ignore to prevent flickering
|
|
528
|
+
needsUpdate = NO;
|
|
529
|
+
targetWindow = g_currentWindowUnderCursor;
|
|
530
|
+
}
|
|
516
531
|
} else {
|
|
517
532
|
// No change needed for toggled window
|
|
518
533
|
needsUpdate = NO;
|
|
@@ -538,10 +553,25 @@ void updateOverlay() {
|
|
|
538
553
|
[NSPredicate predicateWithFormat:@"id == %d", currentWindowId]] firstObject] : nil;
|
|
539
554
|
|
|
540
555
|
if (freshWindowData && ![freshWindowData isEqualToDictionary:g_currentWindowUnderCursor]) {
|
|
541
|
-
//
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
556
|
+
// Check if position change is significant enough to update
|
|
557
|
+
int oldX = [[g_currentWindowUnderCursor objectForKey:@"x"] intValue];
|
|
558
|
+
int oldY = [[g_currentWindowUnderCursor objectForKey:@"y"] intValue];
|
|
559
|
+
int newX = [[freshWindowData objectForKey:@"x"] intValue];
|
|
560
|
+
int newY = [[freshWindowData objectForKey:@"y"] intValue];
|
|
561
|
+
|
|
562
|
+
int deltaX = abs(newX - oldX);
|
|
563
|
+
int deltaY = abs(newY - oldY);
|
|
564
|
+
|
|
565
|
+
if (deltaX >= 3 || deltaY >= 3) {
|
|
566
|
+
// Significant position change - update
|
|
567
|
+
needsUpdate = YES;
|
|
568
|
+
targetWindow = freshWindowData;
|
|
569
|
+
NSLog(@"📍 WINDOW MOVED: (%d,%d) → (%d,%d)", oldX, oldY, newX, newY);
|
|
570
|
+
} else {
|
|
571
|
+
// Minor change - ignore to prevent flickering
|
|
572
|
+
needsUpdate = NO;
|
|
573
|
+
targetWindow = g_currentWindowUnderCursor;
|
|
574
|
+
}
|
|
545
575
|
} else {
|
|
546
576
|
targetWindow = g_currentWindowUnderCursor;
|
|
547
577
|
}
|