node-mac-recorder 2.6.11 → 2.6.12
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 +46 -2
package/package.json
CHANGED
package/src/window_selector.mm
CHANGED
|
@@ -120,6 +120,10 @@ void updateScreenOverlays();
|
|
|
120
120
|
// Ensure no borders or decorations
|
|
121
121
|
self.layer.borderWidth = 0.0;
|
|
122
122
|
self.layer.cornerRadius = 0.0;
|
|
123
|
+
self.layer.masksToBounds = YES;
|
|
124
|
+
self.layer.shadowOpacity = 0.0;
|
|
125
|
+
self.layer.shadowRadius = 0.0;
|
|
126
|
+
self.layer.shadowOffset = NSMakeSize(0, 0);
|
|
123
127
|
}
|
|
124
128
|
return self;
|
|
125
129
|
}
|
|
@@ -176,6 +180,10 @@ void updateScreenOverlays();
|
|
|
176
180
|
// Ensure no borders or decorations
|
|
177
181
|
self.layer.borderWidth = 0.0;
|
|
178
182
|
self.layer.cornerRadius = 0.0;
|
|
183
|
+
self.layer.masksToBounds = YES;
|
|
184
|
+
self.layer.shadowOpacity = 0.0;
|
|
185
|
+
self.layer.shadowRadius = 0.0;
|
|
186
|
+
self.layer.shadowOffset = NSMakeSize(0, 0);
|
|
179
187
|
self.isActiveScreen = NO;
|
|
180
188
|
}
|
|
181
189
|
return self;
|
|
@@ -622,7 +630,7 @@ void updateOverlay() {
|
|
|
622
630
|
CABasicAnimation *floatAnimationX = [CABasicAnimation animationWithKeyPath:@"transform.translation.x"];
|
|
623
631
|
floatAnimationX.fromValue = @(-4.0);
|
|
624
632
|
floatAnimationX.toValue = @(4.0);
|
|
625
|
-
floatAnimationX.duration = 1.
|
|
633
|
+
floatAnimationX.duration = 1.0; // Much faster animation
|
|
626
634
|
floatAnimationX.repeatCount = HUGE_VALF;
|
|
627
635
|
floatAnimationX.autoreverses = YES;
|
|
628
636
|
floatAnimationX.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
|
|
@@ -1037,11 +1045,23 @@ bool startScreenSelection() {
|
|
|
1037
1045
|
[overlayWindow setMovable:NO];
|
|
1038
1046
|
[overlayWindow setMovableByWindowBackground:NO];
|
|
1039
1047
|
|
|
1048
|
+
// Force remove all borders and decorations
|
|
1049
|
+
[overlayWindow setHasShadow:NO];
|
|
1050
|
+
[overlayWindow setOpaque:NO];
|
|
1051
|
+
[overlayWindow setBackgroundColor:[NSColor clearColor]];
|
|
1052
|
+
|
|
1040
1053
|
// Create overlay view
|
|
1041
1054
|
ScreenSelectorOverlayView *overlayView = [[ScreenSelectorOverlayView alloc] initWithFrame:screenFrame];
|
|
1042
1055
|
[overlayView setScreenInfo:screenInfo];
|
|
1043
1056
|
[overlayWindow setContentView:overlayView];
|
|
1044
1057
|
|
|
1058
|
+
// Force window layer to have no borders
|
|
1059
|
+
[overlayWindow setWantsLayer:YES];
|
|
1060
|
+
overlayWindow.layer.borderWidth = 0.0;
|
|
1061
|
+
overlayWindow.layer.borderColor = [[NSColor clearColor] CGColor];
|
|
1062
|
+
overlayWindow.layer.cornerRadius = 0.0;
|
|
1063
|
+
overlayWindow.layer.masksToBounds = YES;
|
|
1064
|
+
|
|
1045
1065
|
// Create select button with more padding
|
|
1046
1066
|
NSButton *selectButton = [[NSButton alloc] initWithFrame:NSMakeRect(0, 0, 200, 60)];
|
|
1047
1067
|
[selectButton setTitle:@"Start Record"];
|
|
@@ -1165,7 +1185,7 @@ bool startScreenSelection() {
|
|
|
1165
1185
|
CABasicAnimation *screenFloatAnimationX = [CABasicAnimation animationWithKeyPath:@"transform.translation.x"];
|
|
1166
1186
|
screenFloatAnimationX.fromValue = @(-4.0);
|
|
1167
1187
|
screenFloatAnimationX.toValue = @(4.0);
|
|
1168
|
-
screenFloatAnimationX.duration = 1.
|
|
1188
|
+
screenFloatAnimationX.duration = 1.2; // Much faster animation
|
|
1169
1189
|
screenFloatAnimationX.repeatCount = HUGE_VALF;
|
|
1170
1190
|
screenFloatAnimationX.autoreverses = YES;
|
|
1171
1191
|
screenFloatAnimationX.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
|
|
@@ -1328,9 +1348,21 @@ bool showScreenRecordingPreview(NSDictionary *screenInfo) {
|
|
|
1328
1348
|
[overlayWindow setMovable:NO];
|
|
1329
1349
|
[overlayWindow setMovableByWindowBackground:NO];
|
|
1330
1350
|
|
|
1351
|
+
// Force remove all borders and decorations
|
|
1352
|
+
[overlayWindow setHasShadow:NO];
|
|
1353
|
+
[overlayWindow setOpaque:NO];
|
|
1354
|
+
[overlayWindow setBackgroundColor:[NSColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.5]];
|
|
1355
|
+
|
|
1331
1356
|
[overlayWindow orderFront:nil];
|
|
1332
1357
|
[overlayWindow makeKeyAndOrderFront:nil];
|
|
1333
1358
|
|
|
1359
|
+
// Force window layer to have no borders
|
|
1360
|
+
[overlayWindow setWantsLayer:YES];
|
|
1361
|
+
overlayWindow.layer.borderWidth = 0.0;
|
|
1362
|
+
overlayWindow.layer.borderColor = [[NSColor clearColor] CGColor];
|
|
1363
|
+
overlayWindow.layer.cornerRadius = 0.0;
|
|
1364
|
+
overlayWindow.layer.masksToBounds = YES;
|
|
1365
|
+
|
|
1334
1366
|
// Store for cleanup (reuse recording preview window variable)
|
|
1335
1367
|
if (!g_recordingPreviewWindow) {
|
|
1336
1368
|
g_recordingPreviewWindow = overlayWindow;
|
|
@@ -1391,10 +1423,22 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
|
|
|
1391
1423
|
[g_overlayWindow setMovable:NO];
|
|
1392
1424
|
[g_overlayWindow setMovableByWindowBackground:NO];
|
|
1393
1425
|
|
|
1426
|
+
// Force remove all borders and decorations
|
|
1427
|
+
[g_overlayWindow setHasShadow:NO];
|
|
1428
|
+
[g_overlayWindow setOpaque:NO];
|
|
1429
|
+
[g_overlayWindow setBackgroundColor:[NSColor clearColor]];
|
|
1430
|
+
|
|
1394
1431
|
// Create overlay view
|
|
1395
1432
|
g_overlayView = [[WindowSelectorOverlayView alloc] initWithFrame:initialFrame];
|
|
1396
1433
|
[g_overlayWindow setContentView:g_overlayView];
|
|
1397
1434
|
|
|
1435
|
+
// Force window layer to have no borders
|
|
1436
|
+
[g_overlayWindow setWantsLayer:YES];
|
|
1437
|
+
g_overlayWindow.layer.borderWidth = 0.0;
|
|
1438
|
+
g_overlayWindow.layer.borderColor = [[NSColor clearColor] CGColor];
|
|
1439
|
+
g_overlayWindow.layer.cornerRadius = 0.0;
|
|
1440
|
+
g_overlayWindow.layer.masksToBounds = YES;
|
|
1441
|
+
|
|
1398
1442
|
// Additional window styling to ensure no borders or decorations
|
|
1399
1443
|
[g_overlayWindow setMovable:NO];
|
|
1400
1444
|
[g_overlayWindow setMovableByWindowBackground:NO];
|