node-mac-recorder 2.22.32 → 2.22.34

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-mac-recorder",
3
- "version": "2.22.32",
3
+ "version": "2.22.34",
4
4
  "description": "Native macOS screen recording package for Node.js applications",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -61,15 +61,17 @@ Napi::Value GetWindowsElectronSafe(const Napi::CallbackInfo& info) {
61
61
  for (SCWindow *window in content.windows) {
62
62
  // Filter out system and small windows
63
63
  if (window.frame.size.width < 50 || window.frame.size.height < 50) continue;
64
- if (!window.title || window.title.length == 0) continue;
65
-
64
+
66
65
  NSString *appName = window.owningApplication.applicationName ?: @"Unknown";
67
-
66
+
68
67
  if (ShouldSkipWindowOwner(appName)) continue;
69
-
68
+
69
+ // Fallback: frameless Electron pencereleri kCGWindowName/title döndürmez
70
+ NSString *displayTitle = (window.title && window.title.length > 0) ? window.title : appName;
71
+
70
72
  NSDictionary *windowInfo = @{
71
73
  @"id": @(window.windowID),
72
- @"name": window.title,
74
+ @"name": displayTitle,
73
75
  @"appName": appName,
74
76
  @"bundleId": window.owningApplication.bundleIdentifier ?: @"",
75
77
  @"x": @((int)window.frame.origin.x),
@@ -116,7 +118,9 @@ Napi::Value GetWindowsElectronSafe(const Napi::CallbackInfo& info) {
116
118
 
117
119
  NSString *appName = (__bridge NSString*)ownerName;
118
120
  NSString *windowTitle = windowName ? (__bridge NSString*)windowName : @"";
119
-
121
+ // Fallback: frameless Electron pencereleri kCGWindowName döndürmez
122
+ if (windowTitle.length == 0) windowTitle = appName;
123
+
120
124
  if (ShouldSkipWindowOwner(appName)) continue;
121
125
 
122
126
  // Get window bounds
@@ -1042,6 +1042,12 @@ Napi::Value GetWindows(const Napi::CallbackInfo& info) {
1042
1042
  CGRectMakeWithDictionaryRepresentation(boundsRef, &bounds);
1043
1043
  }
1044
1044
 
1045
+ // Fallback: frameless Electron pencereleri kCGWindowName döndürmez,
1046
+ // bu durumda appName'i kullan ki pencere listede görünsün.
1047
+ if (windowName.empty() && !appName.empty()) {
1048
+ windowName = appName;
1049
+ }
1050
+
1045
1051
  // Skip windows without name or very small windows
1046
1052
  if (windowName.empty() || bounds.size.width < 50 || bounds.size.height < 50) {
1047
1053
  continue;