aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index a372735..4352351 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -58,8 +58,12 @@ fn main() -> ExitCode {
});
let key_controller = EventControllerKey::new();
- key_controller.connect_key_released(
- clone!(@weak window, @weak input => move |_, k, _, modifiers| {
+ key_controller.connect_key_released(clone!(
+ #[weak]
+ window,
+ #[weak]
+ input,
+ move |_, k, _, modifiers| {
if k == Key::Escape
|| k == Key::Return
|| k == Key::bracketleft && modifiers.contains(ModifierType::CONTROL_MASK)
@@ -68,8 +72,8 @@ fn main() -> ExitCode {
}
*mailbox.lock().unwrap() = input.text().to_string();
let _ = flag_send.try_send(());
- }),
- );
+ }
+ ));
window.add_controller(key_controller);
window.present();