feat: add set_dock_visibility
method
#1058
Open
+123
−2
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.
Add
set_dock_visibility
method to support setting the visibility of the application in the dock.Close #105
As mentioned here, refer to
Electron
to implementset_dock_visibility
method.This is my first PR, so there are some issues that need further confirmation:
set_dock_visibility
need to be completely consistent withset_activation_policy
. For example, we don’t need to do anything extra here: https://github.com/1111mp/tao/blob/c4d0f0555fb0f65993fa4f7b944c45465ed14211/src/platform_impl/macos/app_delegate.rs#L32docker
are consistent with the behavior ofElectron
. More extensive testing may be needed...This is my local demo:
![Screen Recording 2025-02-14 at 21 29 41](https://private-user-images.githubusercontent.com/31227919/413331349-9e8809b1-3a7d-4efa-98a4-2885dfda25ee.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2NzkxMDUsIm5iZiI6MTczOTY3ODgwNSwicGF0aCI6Ii8zMTIyNzkxOS80MTMzMzEzNDktOWU4ODA5YjEtM2E3ZC00ZWZhLTk4YTQtMjg4NWRmZGEyNWVlLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDA0MDY0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA1YmQzY2JkYjEwMDZmMDZkNTVhYTE5M2Q1YjZjMDc2NDY1MzExZDUyNzVlYTQzYWU5MGIxZjY1NzJiYTRjNDYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.wNrFRzjKnaGZdsH4AuQPMVVQ2nRGHk_M2wB65UIpkpg)
Should the icon change only occur in the local environment? I pointed tauri and tao directly to the local code by
patch.crates-io
and then started the demo project.Demo code: