Skip to content

实现windows下任务栏插件分离窗口独立图标#437

Merged
lzx8589561 merged 2 commits into
ZToolsCenter:mainfrom
1284604307:feature/windows-taskbar-plugin-icon
Apr 23, 2026
Merged

实现windows下任务栏插件分离窗口独立图标#437
lzx8589561 merged 2 commits into
ZToolsCenter:mainfrom
1284604307:feature/windows-taskbar-plugin-icon

Conversation

@1284604307

Copy link
Copy Markdown
Contributor

实现了【feature #371 任务栏插件分离窗口独立图标】的windows部分
image

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for independent window icons and unique AppUserModelIDs for detached windows on Windows, which prevents taskbar window merging. The review feedback recommends using the standard fileURLToPath utility for more robust file path conversion and suggests sanitizing the plugin name used in the appId to ensure compatibility with Windows taskbar requirements.

Comment thread src/main/core/detachedWindowManager.ts Outdated
Comment on lines +192 to +194
win.setAppDetails({
appId: 'ZTools.' + pluginName
})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The appId (AppUserModelID) on Windows is used for taskbar grouping and should ideally follow a specific format (e.g., CompanyName.ProductName). It should not contain spaces or special characters other than dots and hyphens. If pluginName contains spaces, it might lead to inconsistent behavior in the Windows taskbar. Sanitizing the string ensures robustness.

Suggested change
win.setAppDetails({
appId: 'ZTools.' + pluginName
})
win.setAppDetails({
appId: 'ZTools.' + pluginName.replace(/[^a-zA-Z0-9.-]/g, '')
})

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@lzx8589561 lzx8589561 merged commit fd8168a into ZToolsCenter:main Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants