node-mac-recorder 2.4.4 → 2.4.5
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 +14 -13
package/package.json
CHANGED
package/src/window_selector.mm
CHANGED
|
@@ -221,8 +221,10 @@ bool hideScreenRecordingPreview();
|
|
|
221
221
|
@implementation WindowSelectorDelegate
|
|
222
222
|
- (void)selectButtonClicked:(id)sender {
|
|
223
223
|
if (g_currentWindowUnderCursor) {
|
|
224
|
-
g_selectedWindowInfo = g_currentWindowUnderCursor;
|
|
225
|
-
|
|
224
|
+
g_selectedWindowInfo = [g_currentWindowUnderCursor copy];
|
|
225
|
+
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.05 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
226
|
+
cleanupWindowSelector();
|
|
227
|
+
});
|
|
226
228
|
}
|
|
227
229
|
}
|
|
228
230
|
|
|
@@ -233,23 +235,22 @@ bool hideScreenRecordingPreview();
|
|
|
233
235
|
// Get screen info from global array using button tag
|
|
234
236
|
if (g_allScreens && screenIndex >= 0 && screenIndex < [g_allScreens count]) {
|
|
235
237
|
NSDictionary *screenInfo = [g_allScreens objectAtIndex:screenIndex];
|
|
236
|
-
g_selectedScreenInfo = screenInfo;
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
[screenInfo objectForKey:@"resolution"]);
|
|
241
|
-
|
|
242
|
-
cleanupScreenSelector();
|
|
238
|
+
g_selectedScreenInfo = [screenInfo copy];
|
|
239
|
+
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.05 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
240
|
+
cleanupScreenSelector();
|
|
241
|
+
});
|
|
243
242
|
}
|
|
244
243
|
}
|
|
245
244
|
|
|
246
245
|
- (void)cancelButtonClicked:(id)sender {
|
|
247
|
-
NSLog(@"🚫 CANCEL BUTTON CLICKED: Selection cancelled");
|
|
248
|
-
// Clean up without selecting anything
|
|
249
246
|
if (g_isScreenSelecting) {
|
|
250
|
-
|
|
247
|
+
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.05 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
248
|
+
cleanupScreenSelector();
|
|
249
|
+
});
|
|
251
250
|
} else {
|
|
252
|
-
|
|
251
|
+
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.05 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
252
|
+
cleanupWindowSelector();
|
|
253
|
+
});
|
|
253
254
|
}
|
|
254
255
|
}
|
|
255
256
|
|