node-mac-recorder 2.9.0 → 2.9.2

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.9.0",
3
+ "version": "2.9.2",
4
4
  "description": "Native macOS screen recording package for Node.js applications",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -81,25 +81,25 @@ void updateScreenOverlays();
81
81
  }
82
82
 
83
83
  - (void)updateAppearance {
84
- if (self.isSelectedWindow) {
85
- // Selected window: same background but thick border (3px)
86
- self.layer.backgroundColor = [[NSColor colorWithRed:0.6 green:0.4 blue:0.9 alpha:0.4] CGColor]; // Same as highlight
87
- self.layer.borderColor = [[NSColor colorWithRed:0.6 green:0.4 blue:0.9 alpha:1.0] CGColor];
88
- self.layer.borderWidth = 3.0; // Thick border for selected window
89
- // Selected window appearance set
90
- } else if (self.isActiveWindow) {
91
- // Active window (highlighted): thin border (1px)
92
- self.layer.backgroundColor = [[NSColor colorWithRed:0.6 green:0.4 blue:0.9 alpha:0.4] CGColor];
93
- self.layer.borderColor = [[NSColor colorWithRed:0.6 green:0.4 blue:0.9 alpha:0.8] CGColor];
94
- self.layer.borderWidth = 1.0; // Thin border for highlighted window
95
- // Active window appearance set
96
- } else {
97
- // Inactive window: no border
98
- self.layer.backgroundColor = [[NSColor colorWithRed:0.4 green:0.2 blue:0.6 alpha:0.25] CGColor];
99
- self.layer.borderColor = [[NSColor clearColor] CGColor];
100
- self.layer.borderWidth = 0.0; // No border for inactive window
101
- // Inactive window appearance set
102
- }
84
+ if (self.isSelectedWindow) {
85
+ // Selected window: same background but medium border (2px)
86
+ self.layer.backgroundColor = [[NSColor colorWithRed:0.6 green:0.4 blue:0.9 alpha:0.4] CGColor]; // Same as highlight
87
+ self.layer.borderColor = [[NSColor colorWithRed:0.6 green:0.4 blue:0.9 alpha:1.0] CGColor];
88
+ self.layer.borderWidth = 2.0; // Medium border for selected window
89
+ // Selected window appearance set
90
+ } else if (self.isActiveWindow) {
91
+ // Active window (highlighted): thin border (1px)
92
+ self.layer.backgroundColor = [[NSColor colorWithRed:0.6 green:0.4 blue:0.9 alpha:0.4] CGColor];
93
+ self.layer.borderColor = [[NSColor colorWithRed:0.6 green:0.4 blue:0.9 alpha:0.8] CGColor];
94
+ self.layer.borderWidth = 1.0; // Thin border for highlighted window
95
+ // Active window appearance set
96
+ } else {
97
+ // Inactive window: no border
98
+ self.layer.backgroundColor = [[NSColor colorWithRed:0.4 green:0.2 blue:0.6 alpha:0.25] CGColor];
99
+ self.layer.borderColor = [[NSColor clearColor] CGColor];
100
+ self.layer.borderWidth = 0.0; // No border for inactive window
101
+ // Inactive window appearance set
102
+ }
103
103
 
104
104
  // Common styling
105
105
  self.layer.cornerRadius = 8.0;
@@ -127,8 +127,8 @@ void updateScreenOverlays();
127
127
  // Handle mouse click to toggle window selection (ONLY selection, no recording start)
128
128
  if (self.windowInfo) {
129
129
  // Check if this window is already selected
130
- BOOL wasSelected = (g_selectedWindowInfo &&
131
- [g_selectedWindowInfo isEqualToDictionary:self.windowInfo]);
130
+ BOOL wasSelected = (g_clickedWindowInfo &&
131
+ [g_clickedWindowInfo isEqualToDictionary:self.windowInfo]);
132
132
 
133
133
  if (wasSelected) {
134
134
  // Deselect this window - return to normal highlight behavior
@@ -172,6 +172,12 @@ void updateScreenOverlays();
172
172
  [self updateAppearance];
173
173
 
174
174
  // DON'T start recording here - that's only for the "Start Record" button
175
+ // Consume the event completely to prevent any propagation
176
+ NSLog(@"🛑 MOUSE EVENT CONSUMED - No recording started");
177
+
178
+ // IMPORTANT: Return YES to indicate we handled the event
179
+ // This prevents the event from propagating to other handlers
180
+ return;
175
181
  }
176
182
  }
177
183
 
@@ -867,6 +873,12 @@ void cleanupWindowSelector() {
867
873
  [g_clickedWindowInfo release];
868
874
  g_clickedWindowInfo = nil;
869
875
  }
876
+
877
+ // Clear selected window info (recording selection)
878
+ if (g_selectedWindowInfo) {
879
+ [g_selectedWindowInfo release];
880
+ g_selectedWindowInfo = nil;
881
+ }
870
882
  }
871
883
 
872
884
  // Recording preview functions