Skip to content

Clipboard access functions don't return #f as documented #328

@kengruven

Description

@kengruven

The function get-clipboard-data says:

Gets the current clipboard contents in a specific format, returning #f if the clipboard does not contain data in the requested format.

In practice, on Linux, I can't get it to return #f:

> (require racket/gui)
> (send the-clipboard set-clipboard-string "hello, world" (current-seconds))
> (send the-clipboard get-clipboard-data "image/jpeg" (current-seconds))
#""

I've confirmed that after calling set-clipboard-string, the only types on the clipboard are "COMPOUND_TEXT", "STRING", "TEXT", "text/plain", "text/plain;charset=utf-8", and "UTF8_STRING". I don't know what comparison algorithm it's using for comparing formats, but by any reasonable measure, there's no JPEG image here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions