Skip to content

Commit ae3896c

Browse files
eatradishStudentWeis
authored andcommitted
fix: ensure init gtk and build tray icon on same thread on linux...
... fix #33
1 parent af01aeb commit ae3896c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/gui/tray.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,14 @@ pub fn start_tray_handler(
6767
let bg_executor = async_app.background_executor().clone();
6868
let bg_executor_clone = bg_executor.clone();
6969

70+
#[cfg(not(target_os = "linux"))]
7071
start_tray_handler_inner(settings, tx, bg_executor_clone);
7172

7273
#[cfg(target_os = "linux")]
7374
bg_executor
7475
.spawn(async move {
7576
gtk::init().expect("Failed to init gtk modules");
77+
start_tray_handler_inner(settings, tx, bg_executor_clone);
7678
gtk::main();
7779
})
7880
.detach();

0 commit comments

Comments
 (0)