Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] hide taskbar icon on macos side is not working #4852

Closed
ayangweb opened this issue Aug 3, 2022 · 6 comments
Closed

[bug] hide taskbar icon on macos side is not working #4852

ayangweb opened this issue Aug 3, 2022 · 6 comments
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@ayangweb
Copy link

ayangweb commented Aug 3, 2022

Describe the bug

Hello developers, the property (skipTaskbar) and method (setSkipTaskbar) for hiding the taskbar icon in macos system are invalid when passed to true or false, and the corresponding method (set_skip_taskbar) is also invalid when written in rust. I don't know if windows is working because there is no windows available for testing! I hope you guys can solve the problem!

Reproduction

If the value of the skipTaskbar property of the windows configuration window in tauri.conf.json is true or false, the effect of hiding is not achieved, and then calling the setSkipTaskbar method of the api will not help either

Expected behavior

I want to hide the icons in the macos dock bar, and of course the same effect for windows

Platform and versions

Environment
› OS: Mac OS 12.4.0 X64
› Node.js: 16.14.1
› npm: 8.5.0
› pnpm: 7.7.1
› yarn: 1.22.17
› rustup: 1.25.1
› rustc: 1.62.1
› cargo: 1.62.1
› Rust toolchain: stable-aarch64-apple-darwin

Packages
› @tauri-apps/cli [NPM]: 1.0.5
› @tauri-apps/api [NPM]: 1.0.2
› tauri [RUST]: 1.0.5,
› tauri-build [RUST]: 1.0.4,
› tao [RUST]: 0.12.2,
› wry [RUST]: 0.19.0,

Stack trace

No response

Additional context

No response

@ayangweb ayangweb added status: needs triage This issue needs to triage, applied to new issues type: bug labels Aug 3, 2022
@ayangweb ayangweb changed the title hide taskbar icon on macos side is not working [BUG] hide taskbar icon on macos side is not working Aug 3, 2022
@ayangweb ayangweb changed the title [BUG] hide taskbar icon on macos side is not working [bug] hide taskbar icon on macos side is not working Aug 3, 2022
@FabianLars
Copy link
Member

skip_taskbar does not work on macos, not a bug, but "expected" behavior. Also, skip_taskbar is window-specific which wouldn't have an effect on macos, since the dock icon is app-specific (i don't know how to explain it, so just ignore that if you don't understand me)

See #2358 and tauri-apps/tao#105 for the relevant macos feature requests.

@PhotonQuantum
Copy link

For anyone who comes to this issue through googling, Tauri has already implemented this feature:

See

pub fn set_activation_policy(&mut self, activation_policy: ActivationPolicy) {

@franciscop
Copy link

To clarify, after few trial/error (I'm not familiar with Rust at all) I found this way to hide the default Docker icon and only show the one on the system tray (top nav):

fn main() {
  let tray_menu = SystemTrayMenu::new(); // insert the menu items here
  let system_tray = SystemTray::new().with_menu(tray_menu);
  tauri::Builder::default()
    .setup(|app| {
      // Make the docker NOT to have an active app when started
      app.set_activation_policy(tauri::ActivationPolicy::Accessory);
      Ok(())
    })
    .system_tray(system_tray)
  // ...

@ayangweb
Copy link
Author

ayangweb commented Jun 2, 2024

To clarify, after few trial/error (I'm not familiar with Rust at all) I found this way to hide the default Docker icon and only show the one on the system tray (top nav):

fn main() {
  let tray_menu = SystemTrayMenu::new(); // insert the menu items here
  let system_tray = SystemTray::new().with_menu(tray_menu);
  tauri::Builder::default()
    .setup(|app| {
      // Make the docker NOT to have an active app when started
      app.set_activation_policy(tauri::ActivationPolicy::Accessory);
      Ok(())
    })
    .system_tray(system_tray)
  // ...

I apologize for getting back to you so late, it does work, thanks!

@ayangweb
Copy link
Author

ayangweb commented Jun 2, 2024

For anyone who comes to this issue through googling, Tauri has already implemented this feature:

See

pub fn set_activation_policy(&mut self, activation_policy: ActivationPolicy) {

Thank you. Indeed.

@franciscop
Copy link

franciscop commented Jun 2, 2024

Edit: nevermind, thought that was new content but you were replying to the older comment :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

4 participants