From: handa Date: Thu, 22 Jul 2004 12:11:04 +0000 (+0000) Subject: (get_selection): If decoding fails and *type is not X-Git-Tag: REL-1-1-0~87 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7eef67d07cbcd7fff9597875ba493925699944bd;p=m17n%2Fm17n-lib.git (get_selection): If decoding fails and *type is not XA_UTF8_STRING, try to get selection value of type XA_UTF8_STRING. --- diff --git a/example/medit.c b/example/medit.c index d8d25d2..31bbf1a 100644 --- a/example/medit.c +++ b/example/medit.c @@ -1070,6 +1070,12 @@ get_selection (Widget w, XtPointer cliend_data, Atom *selection, Atom *type, goto err; this_mt = mconv_decode_buffer (coding, (unsigned char *) value, *length); + if (! this_mt && *type != XA_UTF8_STRING) + { + XtGetSelectionValue (w, XA_PRIMARY, XA_UTF8_STRING, get_selection, NULL, + CurrentTime); + goto err; + } if (this_mt) { hide_cursor ();