node-mac-recorder 2.16.21 → 2.16.22
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"permissions": {
|
|
3
3
|
"allow": [
|
|
4
|
-
"Bash(FORCE_AVFOUNDATION=1 node -e \"\nconsole.log(''
|
|
4
|
+
"Bash(FORCE_AVFOUNDATION=1 node -e \"\nconsole.log(''🚀 FINAL TEST: Ultra-aggressive external display overlay visibility...'');\nconst WindowSelector = require(''./window-selector.js'');\nconst selector = new WindowSelector();\n\nselector.checkPermissions().then(perms => {\n console.log(''✅ Permissions OK'');\n return selector.startSelection();\n}).then(() => {\n console.log(''✅ Window selection started'');\n console.log('''');\n console.log(''🚀 ULTRA-AGGRESSIVE VISIBILITY TEST:'');\n console.log(''1. External display should show BRIGHT RED button (orderFrontRegardless!)''); \n console.log(''2. Button should be above EVERYTHING (kCGMaximumWindowLevel)'');\n console.log(''3. Try clicking - should see click debug logs'');\n console.log('''');\n console.log(''If you STILL cannot see the red button, there is a deeper macOS issue...'');\n \n setTimeout(() => {\n console.log(''⏰ Final test complete'');\n selector.stopSelection();\n }, 25000);\n}).catch(console.error);\")"
|
|
5
5
|
],
|
|
6
6
|
"deny": [],
|
|
7
7
|
"ask": []
|
package/package.json
CHANGED
package/src/window_selector.mm
CHANGED
|
@@ -471,9 +471,15 @@ void updateScreenOverlays();
|
|
|
471
471
|
|
|
472
472
|
@implementation WindowSelectorDelegate
|
|
473
473
|
- (void)selectButtonClicked:(id)sender {
|
|
474
|
+
NSLog(@"🔥 BUTTON CLICKED! Sender: %@", sender);
|
|
475
|
+
NSLog(@"🔥 Current window under cursor: %@", g_currentWindowUnderCursor);
|
|
476
|
+
|
|
474
477
|
if (g_currentWindowUnderCursor) {
|
|
475
478
|
g_selectedWindowInfo = [g_currentWindowUnderCursor retain];
|
|
479
|
+
NSLog(@"🔥 Selected window info set: %@", g_selectedWindowInfo);
|
|
476
480
|
cleanupWindowSelector();
|
|
481
|
+
} else {
|
|
482
|
+
NSLog(@"⚠️ No window under cursor when button clicked!");
|
|
477
483
|
}
|
|
478
484
|
}
|
|
479
485
|
|
|
@@ -1024,11 +1030,22 @@ void updateOverlay() {
|
|
|
1024
1030
|
// CRITICAL FIX: Find the select button on the TARGET screen
|
|
1025
1031
|
NSButton *targetSelectButton = nil;
|
|
1026
1032
|
|
|
1033
|
+
NSLog(@"🔍 DEEP DEBUG: Screen %ld - Looking for UI elements", targetScreenIndex);
|
|
1034
|
+
NSLog(@"🔍 Target overlay: %@", targetOverlay);
|
|
1035
|
+
NSLog(@"🔍 Target overlay contentView: %@", targetOverlay.contentView);
|
|
1036
|
+
NSLog(@"🔍 Target overlay subviews count: %lu", [targetOverlay.contentView subviews].count);
|
|
1037
|
+
|
|
1027
1038
|
for (NSView *subview in [targetOverlay.contentView subviews]) {
|
|
1039
|
+
NSLog(@"🔍 Found subview: %@ - frame: (%.0f,%.0f,%.0f,%.0f)", [subview class],
|
|
1040
|
+
subview.frame.origin.x, subview.frame.origin.y,
|
|
1041
|
+
subview.frame.size.width, subview.frame.size.height);
|
|
1028
1042
|
if ([subview isKindOfClass:[NSButton class]]) {
|
|
1029
1043
|
NSButton *btn = (NSButton*)subview;
|
|
1044
|
+
NSLog(@"🔍 Button title: '%@' - visible: %@ - alpha: %.2f", [btn title],
|
|
1045
|
+
[btn isHidden] ? @"NO" : @"YES", [btn alphaValue]);
|
|
1030
1046
|
if ([[btn title] isEqualToString:@"Start Record"]) {
|
|
1031
1047
|
targetSelectButton = btn;
|
|
1048
|
+
NSLog(@"✅ Found existing Start Record button on Screen %ld", targetScreenIndex);
|
|
1032
1049
|
break;
|
|
1033
1050
|
}
|
|
1034
1051
|
}
|
|
@@ -1036,19 +1053,27 @@ void updateOverlay() {
|
|
|
1036
1053
|
|
|
1037
1054
|
// Create select button on target screen if not exists
|
|
1038
1055
|
if (!targetSelectButton) {
|
|
1056
|
+
NSLog(@"🆕 Creating new Start Record button on Screen %ld", targetScreenIndex);
|
|
1039
1057
|
targetSelectButton = [[HoverButton alloc] initWithFrame:NSMakeRect(0, 0, 200, 60)];
|
|
1040
1058
|
[targetSelectButton setTitle:@"Start Record"];
|
|
1041
1059
|
[targetSelectButton setButtonType:NSButtonTypeMomentaryPushIn];
|
|
1042
1060
|
[targetSelectButton setBordered:NO];
|
|
1043
1061
|
[targetSelectButton setFont:[NSFont systemFontOfSize:16 weight:NSFontWeightRegular]];
|
|
1044
1062
|
|
|
1045
|
-
//
|
|
1063
|
+
// CRITICAL VISUAL FIX: Super aggressive styling for external displays
|
|
1046
1064
|
[targetSelectButton setWantsLayer:YES];
|
|
1047
|
-
[targetSelectButton.layer setBackgroundColor:[[NSColor
|
|
1065
|
+
[targetSelectButton.layer setBackgroundColor:[[NSColor redColor] CGColor]]; // BRIGHT RED for testing
|
|
1048
1066
|
[targetSelectButton.layer setCornerRadius:8.0];
|
|
1049
|
-
[targetSelectButton.layer setBorderWidth:
|
|
1067
|
+
[targetSelectButton.layer setBorderWidth:3.0]; // THICK border
|
|
1068
|
+
[targetSelectButton.layer setBorderColor:[[NSColor yellowColor] CGColor]]; // YELLOW border
|
|
1050
1069
|
[targetSelectButton.layer setMasksToBounds:YES];
|
|
1051
1070
|
|
|
1071
|
+
// Force very visible styling
|
|
1072
|
+
[targetSelectButton.layer setShadowColor:[[NSColor blackColor] CGColor]];
|
|
1073
|
+
[targetSelectButton.layer setShadowOffset:CGSizeMake(5, 5)];
|
|
1074
|
+
[targetSelectButton.layer setShadowRadius:10.0];
|
|
1075
|
+
[targetSelectButton.layer setShadowOpacity:1.0];
|
|
1076
|
+
|
|
1052
1077
|
// Clean white text - normal weight
|
|
1053
1078
|
NSMutableAttributedString *titleString = [[NSMutableAttributedString alloc]
|
|
1054
1079
|
initWithString:[targetSelectButton title]];
|
|
@@ -1069,10 +1094,14 @@ void updateOverlay() {
|
|
|
1069
1094
|
[targetSelectButton setShowsBorderOnlyWhileMouseInside:NO];
|
|
1070
1095
|
|
|
1071
1096
|
[targetOverlay.contentView addSubview:targetSelectButton];
|
|
1097
|
+
NSLog(@"🆕 Added new button to Screen %ld overlay - total subviews now: %lu", targetScreenIndex, [targetOverlay.contentView subviews].count);
|
|
1072
1098
|
}
|
|
1073
1099
|
|
|
1074
1100
|
// Position buttons - Start Record in center of selected window
|
|
1075
1101
|
if (targetSelectButton) {
|
|
1102
|
+
NSLog(@"🎯 Positioning button on Screen %ld - current frame: (%.0f,%.0f,%.0f,%.0f)", targetScreenIndex,
|
|
1103
|
+
targetSelectButton.frame.origin.x, targetSelectButton.frame.origin.y,
|
|
1104
|
+
targetSelectButton.frame.size.width, targetSelectButton.frame.size.height);
|
|
1076
1105
|
NSSize buttonSize = [targetSelectButton frame].size;
|
|
1077
1106
|
// Use local window center for positioning
|
|
1078
1107
|
CGFloat localWindowCenterX = localX + (width / 2);
|
|
@@ -1086,6 +1115,10 @@ void updateOverlay() {
|
|
|
1086
1115
|
localWindowCenterX, localWindowCenterY, buttonCenter.x, buttonCenter.y);
|
|
1087
1116
|
|
|
1088
1117
|
[targetSelectButton setFrameOrigin:buttonCenter];
|
|
1118
|
+
NSLog(@"🎯 After positioning - button frame: (%.0f,%.0f,%.0f,%.0f) - visible: %@ - alpha: %.2f",
|
|
1119
|
+
targetSelectButton.frame.origin.x, targetSelectButton.frame.origin.y,
|
|
1120
|
+
targetSelectButton.frame.size.width, targetSelectButton.frame.size.height,
|
|
1121
|
+
[targetSelectButton isHidden] ? @"NO" : @"YES", [targetSelectButton alphaValue]);
|
|
1089
1122
|
|
|
1090
1123
|
// Position app icon above window center
|
|
1091
1124
|
NSPoint iconCenter = NSMakePoint(
|
|
@@ -1174,9 +1207,34 @@ void updateOverlay() {
|
|
|
1174
1207
|
}
|
|
1175
1208
|
}
|
|
1176
1209
|
|
|
1210
|
+
// CRITICAL DEBUG: Force visibility on external displays
|
|
1211
|
+
NSLog(@"🔍 OVERLAY DEBUG: Screen %ld overlay info:", targetScreenIndex);
|
|
1212
|
+
NSLog(@" - Window: %@", targetOverlay);
|
|
1213
|
+
NSLog(@" - Frame: (%.0f,%.0f,%.0f,%.0f)", targetOverlay.frame.origin.x, targetOverlay.frame.origin.y, targetOverlay.frame.size.width, targetOverlay.frame.size.height);
|
|
1214
|
+
NSLog(@" - Level: %ld", [targetOverlay level]);
|
|
1215
|
+
NSLog(@" - Alpha: %.2f", [targetOverlay alphaValue]);
|
|
1216
|
+
NSLog(@" - Visible: %@", [targetOverlay isVisible] ? @"YES" : @"NO");
|
|
1217
|
+
NSLog(@" - Screen: %@", [targetOverlay screen]);
|
|
1218
|
+
NSLog(@" - OrderedIndex: %ld", [targetOverlay orderedIndex]);
|
|
1219
|
+
|
|
1177
1220
|
[targetOverlay orderFront:nil];
|
|
1178
|
-
//
|
|
1179
|
-
|
|
1221
|
+
[targetOverlay makeKeyAndOrderFront:nil]; // FORCE make key for external displays
|
|
1222
|
+
|
|
1223
|
+
// Additional aggressive visibility for external displays
|
|
1224
|
+
if (targetScreenIndex != 0) {
|
|
1225
|
+
NSLog(@"🔧 EXTERNAL DISPLAY: Applying aggressive visibility fixes for Screen %ld", targetScreenIndex);
|
|
1226
|
+
[targetOverlay setLevel:CGWindowLevelForKey(kCGMaximumWindowLevelKey)];
|
|
1227
|
+
[targetOverlay setAlphaValue:1.0];
|
|
1228
|
+
[targetOverlay orderFront:nil];
|
|
1229
|
+
[targetOverlay makeKeyAndOrderFront:nil];
|
|
1230
|
+
|
|
1231
|
+
// Force order above all other windows
|
|
1232
|
+
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
1233
|
+
[targetOverlay orderFront:nil];
|
|
1234
|
+
NSLog(@"🔧 Post-delay visibility check: Level=%ld, Alpha=%.2f, Visible=%@",
|
|
1235
|
+
[targetOverlay level], [targetOverlay alphaValue], [targetOverlay isVisible] ? @"YES" : @"NO");
|
|
1236
|
+
});
|
|
1237
|
+
}
|
|
1180
1238
|
|
|
1181
1239
|
// Ensure subviews (except overlay view itself) have no borders after positioning
|
|
1182
1240
|
for (NSView *subview in [targetOverlay.contentView subviews]) {
|
|
@@ -2004,6 +2062,33 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
|
|
|
2004
2062
|
|
|
2005
2063
|
NSLog(@" Screen %ld: (%.0f,%.0f) %.0fx%.0f → Overlay created", i, screenFrame.origin.x, screenFrame.origin.y, screenFrame.size.width, screenFrame.size.height);
|
|
2006
2064
|
|
|
2065
|
+
// CRITICAL FIX: Immediately make overlay visible for each screen
|
|
2066
|
+
[screenOverlay orderFront:nil];
|
|
2067
|
+
|
|
2068
|
+
// EXTERNAL DISPLAY FIX: Force visibility for non-primary screens
|
|
2069
|
+
if (i != 0) {
|
|
2070
|
+
NSLog(@"🔧 IMMEDIATE FIX: Forcing Screen %ld overlay visibility", i);
|
|
2071
|
+
|
|
2072
|
+
// ULTRA AGGRESSIVE APPROACH - Force absolute maximum level
|
|
2073
|
+
[screenOverlay setLevel:kCGMaximumWindowLevel]; // Use raw constant instead of key
|
|
2074
|
+
[screenOverlay setAlphaValue:1.0];
|
|
2075
|
+
[screenOverlay makeKeyAndOrderFront:nil];
|
|
2076
|
+
[screenOverlay orderFrontRegardless]; // FORCE to front
|
|
2077
|
+
|
|
2078
|
+
// Additional positioning fix for external displays
|
|
2079
|
+
[screenOverlay setFrame:screenFrame display:YES animate:NO];
|
|
2080
|
+
|
|
2081
|
+
// Force collection behavior to always be on top
|
|
2082
|
+
[screenOverlay setCollectionBehavior:NSWindowCollectionBehaviorStationary |
|
|
2083
|
+
NSWindowCollectionBehaviorCanJoinAllSpaces |
|
|
2084
|
+
NSWindowCollectionBehaviorFullScreenAuxiliary];
|
|
2085
|
+
|
|
2086
|
+
NSLog(@"🔧 Screen %ld post-fix: Frame=(%.0f,%.0f,%.0f,%.0f) Screen=%@ Visible=%@",
|
|
2087
|
+
i, screenOverlay.frame.origin.x, screenOverlay.frame.origin.y,
|
|
2088
|
+
screenOverlay.frame.size.width, screenOverlay.frame.size.height,
|
|
2089
|
+
[screenOverlay screen], [screenOverlay isVisible] ? @"YES" : @"NO");
|
|
2090
|
+
}
|
|
2091
|
+
|
|
2007
2092
|
[g_perScreenOverlays addObject:screenOverlay];
|
|
2008
2093
|
[g_perScreenOverlayViews addObject:overlayView];
|
|
2009
2094
|
}
|