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

Can we not crash on bad clipboard? #581

Open
installgentoo opened this issue Oct 16, 2024 · 0 comments
Open

Can we not crash on bad clipboard? #581

installgentoo opened this issue Oct 16, 2024 · 0 comments
Labels

Comments

@installgentoo
Copy link

installgentoo commented Oct 16, 2024

GLFW_FORMAT_UNAVAILABLE   0x00010009

Analysis
    If emitted during window creation, one or more [hard constraints](https://www.glfw.org/docs/3.3/window_guide.html#window_hints_hard) did not match any of the available pixel formats. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.

    If emitted when querying the clipboard, ignore the error or report it to the user, as appropriate.

Right now if you put some /dev/random into clipboard on X11, glfw callbacks an error, which crashes the application if you care about errors. There's no way to filter this, besides matching a string in glfw callback. Can we instead return a Result from get_clipboard_string() ?

@bvssvni bvssvni added the easy label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants