Skip to content

[bug] After setDockVisibility in development, macOS cannot display the icon #13519

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

Open
r0yx1e opened this issue May 28, 2025 · 3 comments
Open
Labels
platform: macOS priority: 3 low status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@r0yx1e
Copy link

r0yx1e commented May 28, 2025

Describe the bug

Image This has icons

Image This has no icons

Reproduction

const appWindow = getCurrentWindow();
appWindow.listen("tauri://close-requested", () => {
    setDockVisibility(false);
    appWindow.hide();
});
const tray = await TrayIcon.getById("1");
tray?.setMenu(
    await Menu.new({
        items: [
            {
                text: "Open",
                action: () => {
                    setDockVisibility(true);
                    appWindow.show();
                },
            },
        ],
    })
);

Expected behavior

The display should be consistent before hiding the dock icon and after restoring the dock icon.

Full tauri info output

[⚠] Environment
    - OS: Mac OS 15.5.0 x86_64 (X64)
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.87.0 (17067e9ac 2025-05-09) (Homebrew)
    ✔ cargo: 1.87.0 (Homebrew)
    ⚠ rustup: not installed!
      If you have rust installed some other way, we recommend uninstalling it
      then use rustup instead. Visit https://rustup.rs/
    ⚠ Rust toolchain: couldn't be detected!
      Maybe you don't have rustup installed? if so, Visit https://rustup.rs/
    - node: 22.16.0
    - yarn: 1.22.22
    - npm: 10.9.2

[-] Packages
    - tauri 🦀: 2.5.1
    - tauri-build 🦀: 2.2.0
    - wry 🦀: 0.51.2
    - tao 🦀: 0.33.0
    - @tauri-apps/api : 2.5.0
    - @tauri-apps/cli : 2.5.0

[-] Plugins
    - tauri-plugin-opener 🦀: 2.2.7
    - @tauri-apps/plugin-opener : 2.2.7

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: Vue.js
    - bundler: Vite
✨  Done in 11.79s.

Stack trace


Additional context

No response

@r0yx1e r0yx1e added type: bug status: needs triage This issue needs to triage, applied to new issues labels May 28, 2025
@FabianLars
Copy link
Member

Is the behavior the same in tauri dev and tauri build ?

@r0yx1e
Copy link
Author

r0yx1e commented May 28, 2025

Is the behavior the same in tauri dev and tauri build ?

just tauri dev

@FabianLars
Copy link
Member

Then it's probably a wontfix for now. The TransformProcessType API we use for this is basically undocumented so figuring this out is probably very tricky (if it's even fixable).

@FabianLars FabianLars changed the title [bug] After setDockVisibility, macOS cannot display the icon [bug] After setDockVisibility in development, macOS cannot display the icon May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: macOS priority: 3 low status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

3 participants