void WIN_CheckClipboardUpdate(struct SDL_VideoData * data) { const DWORD count = GetClipboardSequenceNumber(); if (count != data->clipboard_count) { if (data->clipboard_count) { SDL_SendClipboardUpdate(); } data->clipboard_count = count; } }
static void data_device_handle_selection(void *data, struct wl_data_device *wl_data_device, struct wl_data_offer *id) { SDL_WaylandDataDevice *data_device = data; SDL_WaylandDataOffer *offer = NULL; if (id != NULL) { offer = wl_data_offer_get_user_data(id); } if (data_device->selection_offer != offer) { Wayland_data_offer_destroy(data_device->selection_offer); data_device->selection_offer = offer; } SDL_SendClipboardUpdate(); }