Skip to content

Commit

Permalink
fix: ensure the closing of the window
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 committed Apr 14, 2024
1 parent 311c878 commit 8365dd8
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 8365dd8

Please sign in to comment.