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

X11 error handler set by another application #65

Open
pmarguinaud opened this issue Jul 29, 2020 · 0 comments
Open

X11 error handler set by another application #65

pmarguinaud opened this issue Jul 29, 2020 · 0 comments

Comments

@pmarguinaud
Copy link

Hello,

I have created a Perl/Tk interface for an existing X11 application based on GLFW.

It works very well, except that I have a problem with X11 errors handling; each time the GLFW library creates a new window, the XSetErrorHandler is called, whereas PerlTk calls this X11 routine once and for all.

See tkError.c:115 :

    if (defaultHandler == NULL) {
	defaultHandler = XSetErrorHandler(ErrorProc);
    }

Then PerlTk is completely lost, and the application exits, reporting an X11 error.

I would like to know whether it would be possible to reset defaultHandler, calling XSetErrorHandler each time Tk_CreateErrorHandler is invoked, as this does not seem to bring any performance penalty (I have tested it).

Maybe we could have that as an option, or create another mean to force PerlTk to reset this variable.

I can contribute to this, if necessary.

Regards,

Philippe

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

1 participant