DioxusLabs / DioxusLabs/dioxus

Left click on tray icon always raises main window

Open
#4,430 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
39.1k
Forks
1.9k
Avg merge
4d 10h
Merged PRs (30d)
4

Description

**Problem**

It seems impossible to prevent a left-click on a tray icon from raising the main window. To reproduce this, modify the `multiwindow_with_tray_icon.rs` example to have the following:

```rust
let tray = init_tray_icon(default_tray_icon(), None);
tray.set_show_menu_on_left_click(true);
```

Run the example, close the main window, and left-click on the tray icon. Note that the context menu appears AND the main window re-appears. I've tried many different ways to suppress this behaviour, and nothing has worked.

Platform: macOS, reproduced with 0.7 alpha 3.

**Expected behavior**

With the code above, only the context menu for the tray appears. I also think that raising the main window by default on left-click is a misfeature that may cause confusion (if it's intentional).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.