ggerganov / imtui

ImTui: Immediate Mode Text-based User Interface C++ Library
https://imtui.ggerganov.com
MIT License
2.94k stars 123 forks source link

ctrl + c in imtui-example-ncurses0 mouse handler issue? #30

Closed PhilipDeegan closed 3 years ago

PhilipDeegan commented 3 years ago

Hi there,

I just installed this to test it out, I tried running one of the examples, "imtui-example-ncurses0", if I ctrl+c during this, it appears to be killed, but if I move my mouse it continues to dump opcodes(?) to the shell

If I run the other example, "hnterm", and ctrl+c during that, it ends, and stops the mouse movement issues.

OS: debian testing (specifically https://crunchbangplusplus.org/oldindex.html) DM: openbox

ggerganov commented 3 years ago

Exiting the program with Ctrl + C can leave the terminal in some weird state, because the endwin() function is never called. I just added an "Exit" button to the example that should make the program quit gracefully:

0f8136dca070bd76cbd9285f9dbb48d96676953a

image

You can try using that button instead of Ctrl + C

PhilipDeegan commented 3 years ago

ok thanks