node-mac-recorder 2.16.20 โ†’ 2.16.21

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(''๐Ÿงช Testing multi-screen window selector UI positioning fix...'');\nconst WindowSelector = require(''./window-selector.js'');\nconst selector = new WindowSelector();\n\nselector.checkPermissions().then(perms => {\n console.log(''Permissions:'', perms);\n return selector.startSelection();\n}).then(() => {\n console.log(''โœ… Window selection started - CRITICAL TEST:'');\n console.log(''๐Ÿ–ฅ๏ธ PRIMARY DISPLAY: Move cursor over windows and verify Record/Cancel buttons + logo + title appear'');\n console.log(''๐Ÿ–ฅ๏ธ EXTERNAL DISPLAY: Move cursor over windows on second screen'');\n console.log(''๐Ÿ“ VERIFY: UI elements appear on the SAME screen as the window (not just primary)'');\n console.log(''โšก This fixes the multi-screen UI positioning bug!'');\n \n setTimeout(() => {\n selector.stopSelection().then(() => {\n console.log(''โœ… Multi-screen UI positioning test complete'');\n });\n }, 20000);\n}).catch(console.error);\")"
4
+ "Bash(FORCE_AVFOUNDATION=1 node -e \"\nconsole.log(''๐ŸŽฏ FINAL TEST: Multi-screen UI visibility fix...'');\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(''๐ŸŽฏ CRITICAL TEST - Both screens should now have same window level:'');\n console.log(''1. Move cursor over MacBook screen window โ†’ should see buttons + logo + title'');\n console.log(''2. Move cursor over external display window โ†’ should ALSO see buttons + logo + title''); \n console.log(''3. Check console for \"\"Level=\"\" logs - both should be 2147483631'');\n console.log('''');\n console.log(''โšก If this works, the multi-screen UI positioning bug is FIXED!'');\n \n setTimeout(() => {\n console.log(''โฐ Test complete - check both screens for UI visibility'');\n selector.stopSelection();\n }, 25000);\n}).catch(console.error);\")"
5
5
  ],
6
6
  "deny": [],
7
7
  "ask": []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-mac-recorder",
3
- "version": "2.16.20",
3
+ "version": "2.16.21",
4
4
  "description": "Native macOS screen recording package for Node.js applications",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -1023,11 +1023,14 @@ void updateOverlay() {
1023
1023
 
1024
1024
  // CRITICAL FIX: Find the select button on the TARGET screen
1025
1025
  NSButton *targetSelectButton = nil;
1026
+
1026
1027
  for (NSView *subview in [targetOverlay.contentView subviews]) {
1027
- if ([subview isKindOfClass:[NSButton class]] &&
1028
- [[(NSButton*)subview title] isEqualToString:@"Start Record"]) {
1029
- targetSelectButton = (NSButton*)subview;
1030
- break;
1028
+ if ([subview isKindOfClass:[NSButton class]]) {
1029
+ NSButton *btn = (NSButton*)subview;
1030
+ if ([[btn title] isEqualToString:@"Start Record"]) {
1031
+ targetSelectButton = btn;
1032
+ break;
1033
+ }
1031
1034
  }
1032
1035
  }
1033
1036
 
@@ -1996,7 +1999,7 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
1996
1999
  [screenOverlay setOpaque:NO];
1997
2000
  [screenOverlay setIgnoresMouseEvents:NO];
1998
2001
  [screenOverlay setAcceptsMouseMovedEvents:YES];
1999
- [screenOverlay setLevel:NSScreenSaverWindowLevel];
2002
+ [screenOverlay setLevel:CGWindowLevelForKey(kCGMaximumWindowLevelKey)]; // CRITICAL FIX: Match highest level
2000
2003
  [screenOverlay setCollectionBehavior:NSWindowCollectionBehaviorCanJoinAllSpaces | NSWindowCollectionBehaviorStationary];
2001
2004
 
2002
2005
  NSLog(@" Screen %ld: (%.0f,%.0f) %.0fx%.0f โ†’ Overlay created", i, screenFrame.origin.x, screenFrame.origin.y, screenFrame.size.width, screenFrame.size.height);