Repository navigation
feat(dock): native right-click menu for dock apps - #240
Open
arnavaggarwal-dev wants to merge 1 commit into
Open
arnavaggarwal-dev wants to merge 1 commit into
arnavaggarwal-dev wants to merge 1 commit into
Conversation
Right-clicking a dock app now opens a native menu like the taskbar's: the app's recent items from its jump list (when it has an AppUserModelID), its name to start a new instance, Pin to Dock or Unpin from Dock, and Close window or Close all windows. A recent item opens through the app's own executable when the dock knows it, so a recent folder opens in the editor rather than Explorer. Shift-right-click still opens Bloom's own menu with the customisation options, and Bloom's menu is the fallback if the native one cannot be shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Hi @SehajveerSingh2005, this gives dock apps a native right-click menu like the Windows taskbar's, including the app's recent items.
Native app menu
Right-clicking a pinned or running app in the dock now shows a native Win32 menu at the cursor with:
IApplicationDocumentLists, looked up by the window's AppUserModelID, or the dock path for packaged apps). Clicking one opens it through the app's own executable when the dock knows it, so a recent folder in VS Code opens in VS Code, not Explorer.The menu returns the chosen action to the dock, which reuses its existing handlers (
handleNewInstance,togglePin,close_window).Shift-right-click still opens Bloom's own menu (custom icon, add apps, Bloom options), and Bloom's menu is also the fallback if the native menu fails. The Start button, tray-only apps and the dock background keep their current menus.
New command:
show_app_menu(registered inmain.rs).Cargo.tomlgains theWin32_UI_Shell_Commonfeature forIObjectArray. No settings.Related issue
Closes #255 (waiting for a maintainer to agree on the approach).
How was this tested?
tsc --noEmit).cargo checkand clippy.Checklist