atexit crash on mac
This commit is contained in:
parent
e510d2744d
commit
c3a3c1a1c7
2 changed files with 1 additions and 2 deletions
|
|
@ -218,8 +218,6 @@ pub fn fix_key_down_timeout_loop() {
|
|||
std::thread::sleep(std::time::Duration::from_millis(300));
|
||||
fix_key_down_timeout(false);
|
||||
});
|
||||
// atexit is called before exit
|
||||
unsafe { libc::atexit(fix_key_down_timeout_at_exit) };
|
||||
unsafe {
|
||||
libc::signal(libc::SIGINT, fix_key_down_timeout_at_signal as _);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -360,6 +360,7 @@ impl UI {
|
|||
}
|
||||
|
||||
fn save_size(&mut self, x: i32, y: i32, w: i32, h: i32) {
|
||||
crate::server::input_service::fix_key_down_timeout_at_exit();
|
||||
Config::set_size(x, y, w, h);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue