mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
5546815441
The AppImage GTK hook (linuxdeploy-plugin-gtk.sh) hardcodes `export GDK_BACKEND=x11`, forcing XWayland to avoid a historical Wayland crash (tauri-apps/tauri#8541). On modern Wayland + NVIDIA setups this forced XWayland instead makes the WebKitGTK webview unable to receive pointer events (GTK titlebar clickable, web content completely dead) and black-screens on resize. Read an opt-in CC_SWITCH_GDK_BACKEND var before GTK init (the hook does not touch it) so affected users can switch back to native Wayland without unpacking the AppImage. Default behavior is unchanged when the var is unset. Refs #4350 Co-authored-by: BoneLiu <bone_liu@sina.com> Co-authored-by: Cursor <cursoragent@cursor.com>