From b1c8a42396fe4af9c7ba5efd757f6958d5d13949 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Mon, 19 Jun 2023 18:53:02 +0300 Subject: [PATCH 1/2] feat: add `libxdo` feature flag ref: https://github.com/tauri-apps/tray-icon/issues/48 --- .changes/linux-libxdo-feature-flag.md | 5 +++++ Cargo.toml | 6 +++++- README.md | 4 ++++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 .changes/linux-libxdo-feature-flag.md diff --git a/.changes/linux-libxdo-feature-flag.md b/.changes/linux-libxdo-feature-flag.md new file mode 100644 index 0000000..687271b --- /dev/null +++ b/.changes/linux-libxdo-feature-flag.md @@ -0,0 +1,5 @@ +--- +"tray-icon": "minor" +--- + +Add `libxdo` feature flag, enabled by default, to control whether to link `libxdo` on Linux or not. diff --git a/Cargo.toml b/Cargo.toml index 012ece1..593c87c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,8 +8,12 @@ repository = "https://github.com/tauri-apps/tray-icon" license = "MIT OR Apache-2.0" categories = [ "gui" ] +[features] +default = [ "libxdo" ] +libxdo = [ "muda/libxdo" ] + [dependencies] -muda = "0.5" +muda = { version = "0.6", default-features = false } crossbeam-channel = "0.5" once_cell = "1" thiserror = "1.0" diff --git a/README.md b/README.md index bc252f0..3489267 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,10 @@ 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 + +- `libxdo` (disabled by default): 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. From 98bc6e8054cf5a4c28f5a029b9f87962e7b4b6d1 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Mon, 19 Jun 2023 22:49:16 +0300 Subject: [PATCH 2/2] add common controls v6 --- .changes/linux-libxdo-feature-flag.md | 2 +- Cargo.toml | 1 + README.md | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.changes/linux-libxdo-feature-flag.md b/.changes/linux-libxdo-feature-flag.md index 687271b..c8d5917 100644 --- a/.changes/linux-libxdo-feature-flag.md +++ b/.changes/linux-libxdo-feature-flag.md @@ -2,4 +2,4 @@ "tray-icon": "minor" --- -Add `libxdo` feature flag, enabled by default, to control whether to link `libxdo` on Linux or not. +Expose `muda` crate feature flags. diff --git a/Cargo.toml b/Cargo.toml index 593c87c..9cc4c02 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,7 @@ categories = [ "gui" ] [features] default = [ "libxdo" ] libxdo = [ "muda/libxdo" ] +common-controls-v6 = [ "muda/common-controls-v6" ] [dependencies] muda = { version = "0.6", default-features = false } diff --git a/README.md b/README.md index 3489267..bb15d8c 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,8 @@ tray-icon lets you create tray icons for desktop applications. ### Cargo Features -- `libxdo` (disabled by default): 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 +- `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)