Skip to content

Fix #205836, multiple menubar instances register same command twice.#205848

Closed
yiliang114 wants to merge 20 commits intomicrosoft:mainfrom
yiliang114:puny-whitefish
Closed

Fix #205836, multiple menubar instances register same command twice.#205848
yiliang114 wants to merge 20 commits intomicrosoft:mainfrom
yiliang114:puny-whitefish

Conversation

@yiliang114
Copy link
Contributor

@yiliang114 yiliang114 commented Feb 21, 2024

Fix #205836

bug33

@bpasero
Copy link
Member

bpasero commented Feb 21, 2024

✋ I think we cannot really change command identifiers here.

@yiliang114
Copy link
Contributor Author

✋ I think we cannot really change command identifiers here.✋我认为我们不能在这里真正改变命令标识符。

Yes, it may indeed not be a good decision. Let me think again

@yiliang114
Copy link
Contributor Author

✋ I think we cannot really change command identifiers here.✋我认为我们不能在这里真正改变命令标识符。

@bpasero I thought of a new solution, because CustomMenubarControl is used in only two places and the instances on both sides are mutually exclusive (the old instance needs to be destroyed before the new one can continue to be initialized), then we can store a static property on the class whose value is the previous menuBar instance.

@yiliang114
Copy link
Contributor Author

✋ I think we cannot really change command identifiers here.✋我认为我们不能在这里真正改变命令标识符。

@bpasero I thought of a new solution, because CustomMenubarControl is used in only two places and the instances on both sides are mutually exclusive (the old instance needs to be destroyed before the new one can continue to be initialized), then we can store a static property on the class whose value is the previous menuBar instance.我想到了一个新的解决方案,因为 CustomMenubarControl 仅在两个地方使用,并且两侧的实例是互斥的 (需要先销毁旧实例,然后才能继续初始化新实例),然后我们可以在类上存储一个静态属性,其值是以前的menuBar实例。

hi @bpasero Can you take time to help me see this pr?

@yiliang114 yiliang114 closed this Dec 16, 2025
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Jan 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switching menubar display position failed with error

7 participants