Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset ImGui and skip restoring curses #77050

Closed
wants to merge 1 commit into from

Conversation

alef
Copy link
Contributor

@alef alef commented Oct 14, 2024

Summary

Bugfixes "Exiting game with CTRL+C leaves console in mouse tracking mode"

Purpose of change

Change the non-Windows CTRL+C signal handler to possibly avoid #77011 .

Describe the solution

exit_handler stacked a SIGINT on the default handler but then called other UI functions when returning the handler.
Now it returns immediately, but right before reset the Im Gui instance pointer, calling its destructor.

Describe alternatives you've considered

Testing

  • ✔ Under WSL2/Ubuntu inside a Zellij pane. Before it left the screen game and the prompt without flashing cursor. After, it cleared the screen and the cursor was back flashing
  • Not tested under native Windows TUI, Android GUI nor MacOS GUI

I am not sure it fixes the escape codes mouse issue reported in #77011, I hope @sparr can test this branch.

Additional context

N/A

The default sighandler should be called shortly after `return` (?)

Affects CleverRaven#77011
@alef
Copy link
Contributor Author

alef commented Oct 14, 2024

#8417 refers

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Oct 14, 2024
@Maleclypse
Copy link
Member

@sparr have you seen this request for you to test?

@sparr
Copy link
Member

sparr commented Oct 16, 2024

Yes. I'll test as soon as I'm building a curses version again (full recompile takes hours for me).

@alef alef deleted the more_sigint branch October 21, 2024 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants