Skip to content

Commit

Permalink
fix: ensure the closing of the window (#63)
Browse files Browse the repository at this point in the history
In case of unexpected error, it's often difficult to close the window.
  • Loading branch information
pythonbrad authored Apr 14, 2024
1 parent 8977d29 commit 6059dab
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/rstk_ext.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
use rstk::*;

pub fn init_rstk_ext() {
// We create some useful tcl functions
rstk::tell_wish("chan configure stdin -encoding utf-8");
rstk::tell_wish(
r#"
chan configure stdin -encoding utf-8
wm protocol . WM_DELETE_WINDOW {destroy .};
"#,
);
}

#[derive(Clone, Debug, Default)]
Expand Down

0 comments on commit 6059dab

Please sign in to comment.