Skip to content

Commit

Permalink
chore: windows compat fixs
Browse files Browse the repository at this point in the history
  • Loading branch information
buxx committed May 20, 2024
1 parent d4e6cdc commit 71997b3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions systray/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ fn run() -> Result<()> {

#[cfg(target_os = "windows")]
{
let tray_stop_signal = stop_signal.clone();
let main_sender_ = main_sender.clone();
let tray_stop_signal = stop_signal_.clone();
let main_sender__ = main_sender_.clone();
match windows::run_tray(
main_sender_,
activity_state,
main_sender__,
activity_state_,
tray_stop_signal,
user_request_sender_,
sync_exchanger_,
Expand All @@ -119,8 +119,8 @@ fn run() -> Result<()> {
}
});

let activity_state_ = activity_state_.clone();
let main_sender_ = main_sender_.clone();
let activity_state_ = activity_state.clone();
let main_sender_ = main_sender.clone();
// TODO : See if we can use multiple viewports (https://github.com/emilk/egui/tree/master/examples/multiple_viewports)
loop {
match user_request_receiver.recv_timeout(Duration::from_millis(150)) {
Expand Down Expand Up @@ -152,7 +152,7 @@ fn run() -> Result<()> {

// When these lines are reached, tray is finished so, close application
log::info!("Stopping ...");
stop_signal_.swap(true, Ordering::Relaxed);
stop_signal.swap(true, Ordering::Relaxed);
main_sender_
.send(DaemonMessage::Stop)
.map_err(|e| Error::Unexpected(format!("Unable to ask manager to stop : '{}'", e)))?;
Expand Down

0 comments on commit 71997b3

Please sign in to comment.