Skip to content

Commit

Permalink
feat: expose muda feature flag (#49)
Browse files Browse the repository at this point in the history
* feat: add `libxdo` feature flag

ref: #48

* add common controls v6
  • Loading branch information
amrbashir authored Jun 19, 2023
1 parent e7e59f0 commit 934b927
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/linux-libxdo-feature-flag.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tray-icon": "minor"
---

Expose `muda` crate feature flags.
7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ repository = "https://github.com/tauri-apps/tray-icon"
license = "MIT OR Apache-2.0"
categories = [ "gui" ]

[features]
default = [ "libxdo" ]
libxdo = [ "muda/libxdo" ]
common-controls-v6 = [ "muda/common-controls-v6" ]

[dependencies]
muda = "0.5"
muda = { version = "0.6", default-features = false }
crossbeam-channel = "0.5"
once_cell = "1"
thiserror = "1.0"
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ tray-icon lets you create tray icons for desktop applications.
- On Windows and Linux, an event loop must be running on the thread, on Windows, a win32 event loop and on Linux, a gtk event loop. It doesn't need to be the main thread but you have to create the tray icon on the same thread as the event loop.
- On macOS, an event loop must be running on the main thread so you also need to create the tray icon on the main thread.

### Cargo Features

- `common-controls-v6`: Use `TaskDialogIndirect` API from `ComCtl32.dll` v6 on Windows for showing the predefined `About` menu item dialog.
- `libxdo`: Enables linking to `libxdo` which is used for the predfined `Copy`, `Cut`, `Paste` and `SelectAll` menu item, see https://github.com/tauri-apps/muda#cargo-features

## Dependencies (Linux Only)

On Linux, `gtk` and `libappindicator` or `libayatnat-appindicator` are used to create the tray icon, so make sure to install them on your system.
Expand Down

0 comments on commit 934b927

Please sign in to comment.