win32: keep clipboard text as gchar

This commit is contained in:
Daemonratte 2026-10-19 14:02:18 +02:00
commit 6f9bcbb93f

View file

@ -558,7 +558,7 @@ gdk_selection_convert (GdkWindow *requestor,
if ((hdata = GetClipboardData (CF_UNICODETEXT)) != NULL)
{
wchar_t *ptr, *p, *q;
guchar *data;
gchar *data;
glong length, wclen;
if ((ptr = GlobalLock (hdata)) != NULL)
@ -586,7 +586,7 @@ gdk_selection_convert (GdkWindow *requestor,
if (data)
selection_property_store (requestor, _utf8_string, 8,
data, strlen (data) + 1);
(guchar *) data, strlen (data) + 1);
GlobalUnlock (hdata);
}
}
@ -1017,7 +1017,8 @@ gdk_text_property_to_text_list_for_display (GdkDisplay *display,
g_get_charset (&charset);
result = g_convert (text, length, charset, source_charset,
/* the property's bytes as text */
result = g_convert ((const gchar *) text, length, charset, source_charset,
NULL, NULL, NULL);
g_free (source_charset);