From 86c6b9791cf39672b29d5b545f5d18a91a465ffb Mon Sep 17 00:00:00 2001 From: "hinto.janai" Date: Tue, 26 Dec 2023 12:01:50 -0500 Subject: [PATCH] xmrig: fix input --- src/xmrig.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xmrig.rs b/src/xmrig.rs index 74e5103..3f34be4 100644 --- a/src/xmrig.rs +++ b/src/xmrig.rs @@ -65,7 +65,7 @@ impl crate::disk::Xmrig { ui.separator(); let response = ui.add_sized([width, text_edit], TextEdit::hint_text(TextEdit::singleline(buffer), r#"Commands: [h]ashrate, [p]ause, [r]esume, re[s]ults, [c]onnection"#)).on_hover_text(XMRIG_INPUT); // If the user pressed enter, dump buffer contents into the process STDIN - if response.lost_focus() && ui.input().key_pressed(egui::Key::Enter) { + if response.lost_focus() && ui.input(|i| i.key_pressed(egui::Key::Enter)) { response.request_focus(); // Get focus back let buffer = std::mem::take(buffer); // Take buffer let mut process = lock!(process); // Lock