refactor: use calloop channel
This commit is contained in:
parent
8e9d7a1e91
commit
83edc4f695
5 changed files with 60 additions and 63 deletions
|
|
@ -43,13 +43,9 @@ impl WorkspaceButton {
|
|||
new_button.connect_clicked(move |_| {
|
||||
let id_clone = id.clone();
|
||||
if !is_active {
|
||||
glib::MainContext::default().spawn_local(async move {
|
||||
TX.get()
|
||||
.unwrap()
|
||||
.send(WorkspaceEvent::Activate(id_clone))
|
||||
.await
|
||||
.unwrap();
|
||||
});
|
||||
let _ = TX.get()
|
||||
.unwrap()
|
||||
.send(WorkspaceEvent::Activate(id_clone));
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue