Skip to content

Commit

Permalink
fix(tao): compilation when only the tray feature is enabled (#363)
Browse files Browse the repository at this point in the history
* fix(tao): compilation when only the tray feature is enabled

* use alias

* simplify

* fix tests
  • Loading branch information
lucasfernog committed Apr 5, 2022
1 parent fa231d7 commit da93895
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changes/fix-tray-feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tao": patch
---

Fixes compilation when only the `tray` feature is enabled.
21 changes: 12 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,21 +174,24 @@ pub mod keyboard;
pub mod menu;
pub mod monitor;
mod platform_impl;
#[cfg(any(
target_os = "windows",
target_os = "macos",
target_os = "linux",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "netbsd",
target_os = "openbsd"
))]

#[cfg(any(target_os = "windows", target_os = "macos",))]
#[cfg(feature = "tray")]
pub mod system_tray;
#[cfg(all(
any(
target_os = "linux",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "netbsd",
target_os = "openbsd"
),
feature = "tray",
any(feature = "gtk-tray", feature = "ayatana-tray"),
not(all(feature = "gtk-tray", feature = "ayatana-tray"))
))]
pub mod system_tray;

pub mod window;

pub mod platform;

0 comments on commit da93895

Please sign in to comment.