node-mac-recorder 2.10.19 → 2.10.20

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.10.19",
3
+ "version": "2.10.20",
4
4
  "description": "Native macOS screen recording package for Node.js applications",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -211,6 +211,9 @@ void updateScreenOverlays();
211
211
  }
212
212
 
213
213
  - (void)animateScale:(CGFloat)scale duration:(NSTimeInterval)duration {
214
+ // Set anchor point to center for center-based scaling
215
+ self.layer.anchorPoint = CGPointMake(0.5, 0.5);
216
+
214
217
  [NSAnimationContext beginGrouping];
215
218
  [NSAnimationContext currentContext].duration = duration;
216
219
  [NSAnimationContext currentContext].timingFunction =
@@ -1024,7 +1027,7 @@ bool showRecordingPreview(NSDictionary *windowInfo) {
1024
1027
  [g_recordingPreviewWindow setAcceptsMouseMovedEvents:NO];
1025
1028
  [g_recordingPreviewWindow setHasShadow:NO];
1026
1029
  [g_recordingPreviewWindow setAlphaValue:1.0];
1027
- [g_recordingPreviewWindow setCollectionBehavior:NSWindowCollectionBehaviorStationary | NSWindowCollectionBehaviorCanJoinAllSpaces];
1030
+ [g_recordingPreviewWindow setCollectionBehavior:NSWindowCollectionBehaviorStationary | NSWindowCollectionBehaviorCanJoinAllSpaces | NSWindowCollectionBehaviorIgnoresCycle];
1028
1031
 
1029
1032
  // Remove any default window decorations and borders
1030
1033
  [g_recordingPreviewWindow setTitlebarAppearsTransparent:YES];
@@ -1201,6 +1204,11 @@ bool startScreenSelection() {
1201
1204
  @try {
1202
1205
  if (g_isScreenSelecting) return false;
1203
1206
 
1207
+ // Clean up any existing window selector first
1208
+ if (g_isWindowSelecting) {
1209
+ cleanupWindowSelector();
1210
+ }
1211
+
1204
1212
  // Get all available screens
1205
1213
  NSArray *screens = [NSScreen screens];
1206
1214
  if (!screens || [screens count] == 0) return false;
@@ -1293,7 +1301,7 @@ bool startScreenSelection() {
1293
1301
  [overlayWindow setHasShadow:NO];
1294
1302
  [overlayWindow setAlphaValue:1.0];
1295
1303
  // Ensure window appears on all spaces and stays put - match g_overlayWindow
1296
- [overlayWindow setCollectionBehavior:NSWindowCollectionBehaviorStationary | NSWindowCollectionBehaviorCanJoinAllSpaces];
1304
+ [overlayWindow setCollectionBehavior:NSWindowCollectionBehaviorStationary | NSWindowCollectionBehaviorCanJoinAllSpaces | NSWindowCollectionBehaviorIgnoresCycle];
1297
1305
 
1298
1306
  // Remove any default window decorations and borders
1299
1307
  [overlayWindow setTitlebarAppearsTransparent:YES];
@@ -1593,7 +1601,7 @@ bool showScreenRecordingPreview(NSDictionary *screenInfo) {
1593
1601
  // no border
1594
1602
  [overlayWindow setStyleMask:NSWindowStyleMaskBorderless];
1595
1603
  [overlayWindow setAlphaValue:1.0];
1596
- [overlayWindow setCollectionBehavior:NSWindowCollectionBehaviorStationary | NSWindowCollectionBehaviorCanJoinAllSpaces];
1604
+ [overlayWindow setCollectionBehavior:NSWindowCollectionBehaviorStationary | NSWindowCollectionBehaviorCanJoinAllSpaces | NSWindowCollectionBehaviorIgnoresCycle];
1597
1605
 
1598
1606
 
1599
1607
  // Force content view to have no borders
@@ -1650,7 +1658,7 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
1650
1658
  }
1651
1659
 
1652
1660
  @try {
1653
- // Clean up any existing overlay first
1661
+ // Clean up any existing overlays first
1654
1662
  if (g_overlayWindow) {
1655
1663
  [g_overlayWindow close];
1656
1664
  g_overlayWindow = nil;
@@ -1658,6 +1666,11 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
1658
1666
  g_selectButton = nil;
1659
1667
  }
1660
1668
 
1669
+ // Also cleanup screen selector if running
1670
+ if (g_isScreenSelecting) {
1671
+ cleanupScreenSelector();
1672
+ }
1673
+
1661
1674
  // Get all windows
1662
1675
  g_allWindows = [getAllSelectableWindows() retain];
1663
1676
 
@@ -1684,7 +1697,7 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
1684
1697
  [g_overlayWindow setAcceptsMouseMovedEvents:YES];
1685
1698
  [g_overlayWindow setHasShadow:NO];
1686
1699
  [g_overlayWindow setAlphaValue:1.0];
1687
- [g_overlayWindow setCollectionBehavior:NSWindowCollectionBehaviorStationary | NSWindowCollectionBehaviorCanJoinAllSpaces | NSWindowCollectionBehaviorFullScreenAuxiliary];
1700
+ [g_overlayWindow setCollectionBehavior:NSWindowCollectionBehaviorStationary | NSWindowCollectionBehaviorCanJoinAllSpaces | NSWindowCollectionBehaviorFullScreenAuxiliary | NSWindowCollectionBehaviorIgnoresCycle];
1688
1701
 
1689
1702
  // Remove any default window decorations and borders
1690
1703
  [g_overlayWindow setTitlebarAppearsTransparent:YES];