Rewrite CEF browser as child of Kivy window (v2)

v1 created a separate Win32 window — same problem as external Chrome.
v2 creates CEF as a CHILD WINDOW of Kivy's SDL_app window:
  - No separate taskbar entry
  - No z-order fighting (CEF is INSIDE Kivy)
  - No desktop flash
  - CEF message loop pumped via Kivy Clock (main thread)
  - Resize handler attached so CEF follows Kivy window changes
  - build.spec includes cef_browser in hidden imports
This commit is contained in:
ske087
2026-07-24 16:22:33 +03:00
parent 5a030671a2
commit 12f2880201
3 changed files with 154 additions and 183 deletions
+2 -3
View File
@@ -102,6 +102,7 @@ hidden_imports = [
'selectors',
'tempfile',
# Windows-specific
'cef_browser',
'win32gui',
'win32con',
]
@@ -134,9 +135,7 @@ if kv_file.exists():
kv_data.append((str(kv_file), '.'))
# Bundle the entire src directory as a tree
source_tree = Tree(str(SRC_DIR), prefix='')
# Filter out pyc files, pycache dirs, and ini files
source_tree.excludes = ['*.pyc', '__pycache__', '*.ini']
source_tree = Tree(str(SRC_DIR), prefix='', excludes=['*.pyc', '__pycache__', '*.ini'])
# --- Collect binary DLLs from kivy_deps and ffpyplayer ----------------
import importlib.util