tauri icon indicating copy to clipboard operation
tauri copied to clipboard

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

Open r0yx1e opened this issue 7 months ago • 3 comments

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 avatar May 28 '25 01:05 r0yx1e

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

FabianLars avatar May 28 '25 11:05 FabianLars

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

just tauri dev

r0yx1e avatar May 28 '25 12:05 r0yx1e

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 avatar May 28 '25 12:05 FabianLars