Skip to content

Can we not crash on bad clipboard? #581

@installgentoo

Description

@installgentoo
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() ?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions