Skip to content

Commit 2af9280

Browse files
committed
fix: don't close program on esc
1 parent b434f54 commit 2af9280

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎player/src/gui.rs‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,16 @@ impl UIThread {
607607
_ => false,
608608
}
609609
}
610+
fltk::enums::Event::Shortcut => {
611+
let key = app::event_key();
612+
613+
if key == Key::Escape {
614+
// don't close the program (mark the event as handled)
615+
true
616+
} else {
617+
false
618+
}
619+
}
610620
_ => false,
611621
}
612622
}

0 commit comments

Comments
 (0)