Closed safarp closed 4 years ago
Thanks for the report. I just pushed a fix
I think the shutdown mechanism needs to be expanded because you can still see the mouse events in the event of a SIGINT or SIGSEGV I added something like this to fix it but I guess it can be handled more elegantly
void finish(int sig){
ImTui_ImplText_Shutdown();
ImTui_ImplNcurses_Shutdown();
exit(0);
}
int main() {
signal(SIGINT, finish);
When I run imtui-example-ncurses0 or hnterm (with mouse support enabled) in my Linux terminal, the mouse events are reported into the terminal after the apps are exited.
I believe that it is because of the
printf("\033[?1003h\n");
. When I add a code to disable mouse movementprintf("\033[?1003l\n");
before the application is exited, everything is fine and mouse events are not reported into the terminal anymore.I also found some useful information about it here.