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 +1 -1
- package/src/window_selector.mm +33 -21
package/package.json
CHANGED
package/src/window_selector.mm
CHANGED
|
@@ -81,25 +81,25 @@ void updateScreenOverlays();
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
- (void)updateAppearance {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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 = (
|
|
131
|
-
[
|
|
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
|