fix(dsh): preserve acrylic and restore durable native model settings
Core regression / Python core and release configuration (push) Successful in 15s
Core regression / JavaScript syntax (push) Successful in 3s
Core regression / Python core and release configuration (pull_request) Successful in 15s
Core regression / JavaScript syntax (pull_request) Successful in 3s

This commit is contained in:
阿白叔 committed 2026-11-03 11:41:50 +08:00
1 parent 3cec9adc5f
commit 374e1cd5bf
11 files changed
+262 -17

No files matched your search

@@ -5,7 +5,7 @@ import json
import codecs
from pathlib import Path
from PySide6.QtCore import QProcess, QProcessEnvironment, QTimer, QUrl, Signal
from PySide6.QtCore import QProcess, QProcessEnvironment, QTimer, QUrl, Signal, Qt
from PySide6.QtWebEngineCore import QWebEnginePage, QWebEngineProfile, QWebEngineSettings
from PySide6.QtWebEngineWidgets import QWebEngineView
from PySide6.QtWidgets import QLabel, QPushButton, QVBoxLayout, QWidget
@@ -37,6 +37,11 @@ class NativeHarnessView(QWidget):
def __init__(self, data_root: Path, parent=None):
super().__init__(parent)
# Isolate Chromium's RHI surface in this child HWND. Otherwise showing
# WebEngine recreates the translucent task-center HWND as an opaque
# graphics surface and Acrylic stays white after the view is hidden.
self.setAttribute(Qt.WidgetAttribute.WA_DontCreateNativeAncestors)
self.setAttribute(Qt.WidgetAttribute.WA_NativeWindow)
self.setObjectName('dshNativeWorkspace')
self.setStyleSheet('QWidget#dshNativeWorkspace {background:white;}')
self.data_root = Path(data_root)