From e12960e6a647b03ef9fb1de77649b68c8a22c8cb Mon Sep 17 00:00:00 2001 From: osy <50960678+osy@users.noreply.github.com> Date: Sun, 31 Jan 2021 20:33:06 -0800 Subject: [PATCH] iOS+macOS: fix white background in terminal mode Fixes #1201 --- Platform/iOS/UTMDataExtension.swift | 1 + Platform/macOS/Display/VMDisplayTerminalWindowController.swift | 1 + 2 files changed, 2 insertions(+) diff --git a/Platform/iOS/UTMDataExtension.swift b/Platform/iOS/UTMDataExtension.swift index 13c5395aa..2dec6861f 100644 --- a/Platform/iOS/UTMDataExtension.swift +++ b/Platform/iOS/UTMDataExtension.swift @@ -22,6 +22,7 @@ extension UTMData { if vm.configuration.displayConsoleOnly { let vc = VMDisplayTerminalViewController() let webView = WKWebView() + webView.isOpaque = false vm.delegate = vc vc.vm = vm vc.webView = webView diff --git a/Platform/macOS/Display/VMDisplayTerminalWindowController.swift b/Platform/macOS/Display/VMDisplayTerminalWindowController.swift index c41bfb636..436f86f24 100644 --- a/Platform/macOS/Display/VMDisplayTerminalWindowController.swift +++ b/Platform/macOS/Display/VMDisplayTerminalWindowController.swift @@ -39,6 +39,7 @@ class VMDisplayTerminalWindowController: VMDisplayWindowController { webConfig.userContentController.add(self, name: JSCommand.sendTerminalSize.rawValue) webView = WKWebView(frame: displayView.bounds, configuration: webConfig) webView.autoresizingMask = [.width, .height] + webView.setValue(false, forKey: "drawsBackground") displayView.addSubview(webView) // load terminal.html