X11Clipboard is a data race and should not be `Sync`
claim_clipboard_ownership, as well as respond_to_clipboard_request perform unsynchronized accesses on mutable statics:
https://github.com/not-fl3/miniquad/blob/cccea681683bec392b890e11d0c5f4b7795ffd36/src/native/linux_x11/clipboard.rs#L130-L149
This means that X11Clipboard::set is not threadsafe:
https://github.com/not-fl3/miniquad/blob/cccea681683bec392b890e11d0c5f4b7795ffd36/src/native/linux_x11/clipboard.rs#L229-L242
Nevertheless, X11Clipboard explicitly implements Send and Sync:
https://github.com/not-fl3/miniquad/blob/cccea681683bec392b890e11d0c5f4b7795ffd36/src/native/linux_x11/clipboard.rs#L217-L218
Moreover, removing the Sync impl would not be enough – creating two separate X11Clipboard instances can cause UB even without this impl.
Looks like the same can be said about WaylandClipboard.
In practice this is ok since globally there is only one instance of X11Clipboard guarded behind a Mutex. Although I agree that I don't like the static mut either -- imo the clipboard object should own the string.
If it's behind a Mutex, it definitely doesn't need the Sync impl – Send should be enough.