Commit e400064 1 parent 181025f commit e400064 Copy full SHA for e400064
File tree 2 files changed +14
-8
lines changed
2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ impl Wish {
25
25
r#"
26
26
wm overrideredirect {wish_obj} 1;
27
27
wm attributes {wish_obj} -topmost 1;
28
- bind {wish_obj} <Button-1 > {{destroy .; exit;}};
28
+ bind {wish_obj} <Motion > {{destroy .; exit;}};
29
29
"#
30
30
) ) ;
31
31
}
@@ -76,12 +76,16 @@ impl api::Frontend for Wish {
76
76
}
77
77
78
78
fn update_text ( & mut self , text : Vec < char > ) {
79
- self . label . text (
80
- & text
81
- . into_iter ( )
82
- . map ( |c| c. to_string ( ) )
83
- . collect :: < Vec < _ > > ( )
84
- . join ( "" ) ,
85
- ) ;
79
+ let text = text
80
+ . into_iter ( )
81
+ . map ( |c| c. to_string ( ) )
82
+ . collect :: < Vec < _ > > ( )
83
+ . join ( "" ) ;
84
+
85
+ self . label . text ( & text) ;
86
+
87
+ if text == "_exit_" {
88
+ rstk:: end_wish ( ) ;
89
+ }
86
90
}
87
91
}
Original file line number Diff line number Diff line change
1
+ #![ windows_subsystem = "windows" ]
2
+
1
3
use clafrica:: { run, Config } ;
2
4
use clafrica_wish:: Wish ;
3
5
use std:: { env, process} ;
You can’t perform that action at this time.
0 commit comments