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

Strange behaviour - can libui respond to SIGINT? #13

Open
rubyFeedback opened this issue Jan 5, 2021 · 1 comment
Open

Strange behaviour - can libui respond to SIGINT? #13

rubyFeedback opened this issue Jan 5, 2021 · 1 comment

Comments

@rubyFeedback
Copy link
Collaborator

Hey there kojix2,

Sorry for filling this issue tracker in the new year! :D

(I am just randomly testing libui again ... I sort of start with ruby-gtk when I wake up, fix
some old issues, then have more fun afterwards playing with libui hehe)

There is one thing that annoys me a bit.

When I start a .rb file with fiddle + libui, the widget works, it is shown, all works
fine. But I start it from the terminal (commandline, KDE konsole), and when when
I press ctrl+c I can normally quit. I usually do this because it is faster than
clicking with the mouse cursor.

But, libui or so seems to not respond to it. This is different to ruby-gtk.

In my custom ruby code I generally use a method such as this:

def register_sigint
  Signal.trap('SIGINT') { exit }
end; register_sigint

Then ctrl+c tends to work.

Is there a way to "assign" ctrl+c to cause a libui based .rb file
to also behave in the same way? Right now I can still use
ctrl+z for background sending, but I'd love to see ctrl+c also
works by default if that is possible. If not don't worry, just
ignore this issue request.

@kojix2
Copy link
Owner

kojix2 commented Jan 5, 2021

Yes.

I understand very well.
I also tend to press Ctrl+C and get a little disappointed when the libui window doesn't close.
I'll see if there's any way to improve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants