Skip to content

People have dreamed of running macOS on iPad for more than a decade. Today, that dream comes true. With Virtual Mac, iPad finally breaks free from iPadOS, enabling pro apps like Xcode, Terminal, Final Cut Pro, Logic Pro, and Pixelmator Pro to run directly on device. Requires iPad Pro (M1, M2) or iPad Air (M1) running iPadOS 14 up to 16.3.1.

Shell

fix: replug delay takeover and makeKeyAndVisible

qwqVictor5f4bdbb04e3f
diff --git a/VirtualMac/vz/host/VirtualMacApp.m b/VirtualMac/vz/host/VirtualMacApp.m
index 7c6cb01..41f0e4f 100644
--- a/VirtualMac/vz/host/VirtualMacApp.m
+++ b/VirtualMac/vz/host/VirtualMacApp.m
@@ -2001,8 +2001,13 @@ static void sendSoftwareChord(UIKeyboardHIDUsage usage, BOOL shifted,
// Use the screen from the notification directly — UIScreen.screens
// may not be updated yet at the time this notification fires.
UIScreen *screen = notification.object;
- if (screen && screen != UIScreen.mainScreen && externalDisplayEnabled())
- connectExternalDisplayWithScreen(screen);
+ if (screen && screen != UIScreen.mainScreen && externalDisplayEnabled()) {
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW,
+ (int64_t)(0.5 * NSEC_PER_SEC)),
+ dispatch_get_main_queue(), ^{
+ connectExternalDisplayWithScreen(screen);
+ });
+ }
} else {
disconnectExternalDisplay();
}
@@ -4224,7 +4229,7 @@ static void connectExternalDisplayWithScreen(UIScreen *extScreen) {
[gExternalWindow addSubview:gExternalCursorView];
updateExternalCursorForNormalizedLocation(gLastPointerLocation);
- gExternalWindow.hidden = NO;
+ [gExternalWindow makeKeyAndVisible];
updateDisplayGeometry();
updateExternalCursorForNormalizedLocation(gLastPointerLocation);
printf("[VirtualMac] external window created frame=%s\n",