[Bug][Kimi Desktop][Windows] 桌面宠物 / 看板桌面小组件后方显示矩形阴影(透明窗口的"占地面积"可见)

## 问题描述

在 Windows 上使用桌面宠物或看板(Dashboard)的桌面小组件时,小组件后方始终显示一层矩形阴影,完整勾勒出窗口的"占地面积"。

**预期行为**:小组件窗口是透明的,透明区域不应有任何可见痕迹,只显示小组件内容本身。

**实际行为**:透明区域边缘有一圈系统投影,按窗口矩形边界绘制,使小组件的矩形范围在桌面上清晰可见。

## 复现步骤

1. 在 Windows 11 上打开 Kimi 桌面端

2. 启用桌面宠物,或将看板小组件固定到桌面

3. 观察小组件后方 —— 可见一圈贴合窗口矩形边界的阴影

## 环境信息

| 项目 | 信息 |

|------|------|

| 应用版本 | Kimi 桌面端 3.2.6 |

| 操作系统 | Windows 11 专业工作站版,Build 26200(64 位) |

| 系统透明效果 | 开启(设置 → 个性化 → 颜色 → 透明效果) |

| 独立显卡 | NVIDIA GeForce RTX 5060,驱动 32.0.16.1656(2026-08-20) |

| 集成显卡 | AMD Radeon Graphics,驱动 32.0.21045.5002(2026-08-17) |

| 其他显示驱动 | OrayIddDriver Device(向日葵虚拟显示器驱动 17.50.19.949,2025-06-11) |

## 技术分析(供开发参考)

该现象与 Electron 透明窗口在 Windows 上的已知行为一致:

1. 桌面小组件应为 `transparent: true` + `frame: false` 的透明无边框窗口,窗口本身是一个完整矩形,仅内容区域透明。

2. Windows 的 DWM(桌面窗口管理器)默认按**窗口矩形边界**为顶层窗口绘制投影,不考虑窗口内像素的透明度。因此即使内容透明,阴影仍会描出整个矩形范围。

3. Electron 官方文档注明:透明窗口在 macOS 上不显示原生阴影,但 Windows 上会——这解释了为什么该问题只在 Windows 端出现。

**建议修复方向**:

- 创建小组件窗口时设置 `hasShadow: false`;或

- 通过 DWM API 关闭非客户区渲染(如 `DWMWA_NCRENDERING_POLICY` 设为 `DWMNCRP_DISABLED`);或

- 移除窗口类的 `CS_DROPSHADOW` 样式。

参考资料:

- Electron 官方文档 Custom Window Styles(透明窗口限制说明):Custom Window Styles | Electron

- Electron issue #24952(透明窗口与 Windows 阴影行为):No Window Shadow When Set To Transparent · Issue #24952 · electron/electron · GitHub

## 附加说明

- 本机同时安装了向日葵远程控制的虚拟显示器驱动(OrayIddDriver)。官方论坛此前有"安装虚拟显示适配器导致 Kimi Desktop 异常"的案例(GameViewer Virtual Display Adapter 导致启动崩溃),如开发团队排查时无法复现,可考虑虚拟显示驱动对 DWM 合成路径的干扰因素。

- 如需更多诊断信息(截图、日志、DWM 窗口属性 dump),可联系本人配合提供。

1 Like

Hi, 感谢提交报告。请问可以提供截图信息吗?

  1. Press Win + R.
  2. Run SystemPropertiesPerformance.exe.
  3. Open Visual Effects, uncheck Show shadows under windows, click Apply, then restart the Kimi/Codex app.

Thank you for the advice! I tried it — ran SystemPropertiesPerformance.exe, unchecked “Show shadows under windows”, clicked Apply, and restarted the Kimi app — but unfortunately the shadow is still there.

Two more observations that might help narrow this down:

1. On the same PC, the WPS Office startup popup (also a frameless window) shows a similar shadow outline as well. So this seems to affect transparent / frameless windows in general on this machine, not just Kimi.

2. The Hermes desktop app (also Electron-based) ran into a closely related transparent-window / DWM shadow issue on Windows 11 and ended up fixing it on the app side: [Bug]: Windows 11 rounded window corners and drop shadows lost due to unconditional transparent: true on chat windows · Issue #90505 · NousResearch/hermes-agent · GitHub

So it looks like this can only be fully fixed in the Kimi desktop client itself (e.g. explicitly disabling the window shadow for the pet / dashboard widget windows via hasShadow or the DWM APIs). Hope this helps!

Worth a shot! I Linux so.