Skip to content
  • LRN's avatar
    GDK W32: Be honest about supported clipboard formats · f0959c9c
    LRN authored
    Do not lie to W32 about the formats that we provide or accept.
    
    Originally the logic behind such lies was that GdkPixbuf allows
    us to convert any supported image to BMP or PNG, and therefore
    we should announce that we always provide/accept BMP and PNG along
    with other formats.
    
    But that's not how it works. The conversion between formats happens
    at GTK level in GtkClipboard or, if GtkClipboard is not used, with
    gtk_target_list_add_image_targets() to announce all supported image
    formats, and with gtk_selection_data_set_pixbuf() to convert from
    any GdkPixbuf formats to the format requested by the selection, and
    with gtk_selection_data_get_pixbuf() to convert from the selection
    format to GdkPixbuf, if supported.
    
    GDK simply does not play any role in this. Therefore W32 GDK backend
    should only offer formats that it can actually do conversion for
    by itself (such as image/bmp <-> CF_DIB,
    or text/uri-list <-> CFSTR_SHELLIDLIST).
    f0959c9c