node-mac-recorder 2.10.22 → 2.10.23
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 +16 -17
package/package.json
CHANGED
package/src/window_selector.mm
CHANGED
|
@@ -108,29 +108,19 @@ void updateScreenOverlays();
|
|
|
108
108
|
xRadius:8.0
|
|
109
109
|
yRadius:8.0];
|
|
110
110
|
|
|
111
|
-
// Fill color
|
|
111
|
+
// Fill color only - no border
|
|
112
112
|
NSColor *fillColor;
|
|
113
|
-
NSColor *strokeColor;
|
|
114
|
-
CGFloat lineWidth;
|
|
115
113
|
|
|
116
114
|
if (self.isToggled) {
|
|
117
|
-
// Locked state:
|
|
118
|
-
fillColor = [NSColor colorWithRed:0.6 green:0.4 blue:0.9 alpha:0.
|
|
119
|
-
strokeColor = [NSColor colorWithRed:0.45 green:0.25 blue:0.75 alpha:0.9];
|
|
120
|
-
lineWidth = 1.0;
|
|
115
|
+
// Locked state: slightly different opacity
|
|
116
|
+
fillColor = [NSColor colorWithRed:0.6 green:0.4 blue:0.9 alpha:0.5];
|
|
121
117
|
} else {
|
|
122
|
-
// Normal state:
|
|
118
|
+
// Normal state: standard fill
|
|
123
119
|
fillColor = [NSColor colorWithRed:0.6 green:0.4 blue:0.9 alpha:0.4];
|
|
124
|
-
strokeColor = [NSColor whiteColor];
|
|
125
|
-
lineWidth = 1.0;
|
|
126
120
|
}
|
|
127
121
|
|
|
128
122
|
[fillColor setFill];
|
|
129
123
|
[highlightPath fill];
|
|
130
|
-
|
|
131
|
-
[strokeColor setStroke];
|
|
132
|
-
[highlightPath setLineWidth:lineWidth];
|
|
133
|
-
[highlightPath stroke];
|
|
134
124
|
}
|
|
135
125
|
|
|
136
126
|
- (void)updateAppearance {
|
|
@@ -201,6 +191,9 @@ void updateScreenOverlays();
|
|
|
201
191
|
self = [super initWithFrame:frameRect];
|
|
202
192
|
if (self) {
|
|
203
193
|
self.isHovered = NO;
|
|
194
|
+
self.wantsLayer = YES;
|
|
195
|
+
// Set anchor point to center once for consistent scaling
|
|
196
|
+
self.layer.anchorPoint = CGPointMake(0.5, 0.5);
|
|
204
197
|
[self setupHoverTracking];
|
|
205
198
|
}
|
|
206
199
|
return self;
|
|
@@ -218,17 +211,16 @@ void updateScreenOverlays();
|
|
|
218
211
|
- (void)mouseEntered:(NSEvent *)event {
|
|
219
212
|
self.isHovered = YES;
|
|
220
213
|
[self animateScale:1.2 duration:0.15];
|
|
214
|
+
[[NSCursor pointingHandCursor] set];
|
|
221
215
|
}
|
|
222
216
|
|
|
223
217
|
- (void)mouseExited:(NSEvent *)event {
|
|
224
218
|
self.isHovered = NO;
|
|
225
219
|
[self animateScale:1.0 duration:0.15];
|
|
220
|
+
[[NSCursor arrowCursor] set];
|
|
226
221
|
}
|
|
227
222
|
|
|
228
223
|
- (void)animateScale:(CGFloat)scale duration:(NSTimeInterval)duration {
|
|
229
|
-
// Set anchor point to center for center-based scaling
|
|
230
|
-
self.layer.anchorPoint = CGPointMake(0.5, 0.5);
|
|
231
|
-
|
|
232
224
|
[NSAnimationContext beginGrouping];
|
|
233
225
|
[NSAnimationContext currentContext].duration = duration;
|
|
234
226
|
[NSAnimationContext currentContext].timingFunction =
|
|
@@ -590,6 +582,13 @@ NSDictionary* getWindowUnderCursor(CGPoint point) {
|
|
|
590
582
|
|
|
591
583
|
// Find window that contains the cursor point
|
|
592
584
|
for (NSDictionary *window in g_allWindows) {
|
|
585
|
+
NSString *appName = [window objectForKey:@"appName"];
|
|
586
|
+
|
|
587
|
+
// Skip Electron windows (our own overlay)
|
|
588
|
+
if (appName && ([appName containsString:@"Electron"] || [appName containsString:@"node"])) {
|
|
589
|
+
continue;
|
|
590
|
+
}
|
|
591
|
+
|
|
593
592
|
int x = [[window objectForKey:@"x"] intValue];
|
|
594
593
|
int y = [[window objectForKey:@"y"] intValue];
|
|
595
594
|
int width = [[window objectForKey:@"width"] intValue];
|