aboutsummaryrefslogtreecommitdiffstats
path: root/src/xselect.c
diff options
context:
space:
mode:
authorMiles Bader2005-02-18 00:41:50 +0000
committerMiles Bader2005-02-18 00:41:50 +0000
commit8d46efcc0f2045a1e5a2739c55ba6a88fbf4bcfc (patch)
treebc968a02587d51199537bb335d5494e756e35fdf /src/xselect.c
parent8589dc17f80450f5773a2d449fa6d94c9bb04fe3 (diff)
parent9b516537a9899900647d4eae5ec8778e6837ad3c (diff)
downloademacs-8d46efcc0f2045a1e5a2739c55ba6a88fbf4bcfc.tar.gz
emacs-8d46efcc0f2045a1e5a2739c55ba6a88fbf4bcfc.zip
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-15
Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-95 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-96 Move Gnus images into etc/images * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-97 - miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-105 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-14 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-15 Update from CVS: lisp/imap.el (imap-log): Doc fix. * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-16 Merge from emacs--cvs-trunk--0
Diffstat (limited to 'src/xselect.c')
-rw-r--r--src/xselect.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/xselect.c b/src/xselect.c
index bf37cde4d0b..a49b6b89ee4 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -1908,7 +1908,12 @@ lisp_data_to_selection_data (display, obj,
1908 } 1908 }
1909 else if (STRINGP (obj)) 1909 else if (STRINGP (obj))
1910 { 1910 {
1911 xassert (! STRING_MULTIBYTE (obj)); 1911 if (SCHARS (obj) < SBYTES (obj))
1912 /* OBJ is a multibyte string containing a non-ASCII char. */
1913 Fsignal (Qerror, /* Qselection_error */
1914 Fcons (build_string
1915 ("Non-ASCII string must be encoded in advance"),
1916 Fcons (obj, Qnil)));
1912 if (NILP (type)) 1917 if (NILP (type))
1913 type = QSTRING; 1918 type = QSTRING;
1914 *format_ret = 8; 1919 *format_ret = 8;
@@ -2184,7 +2189,10 @@ Disowning it means there is no such selection. */)
2184{ 2189{
2185 Time timestamp; 2190 Time timestamp;
2186 Atom selection_atom; 2191 Atom selection_atom;
2187 struct selection_input_event event; 2192 union {
2193 struct selection_input_event sie;
2194 struct input_event ie;
2195 } event;
2188 Display *display; 2196 Display *display;
2189 struct x_display_info *dpyinfo; 2197 struct x_display_info *dpyinfo;
2190 struct frame *sf = SELECTED_FRAME (); 2198 struct frame *sf = SELECTED_FRAME ();
@@ -2212,10 +2220,10 @@ Disowning it means there is no such selection. */)
2212 the selection owner to None. The NCD server does, the MIT Sun4 server 2220 the selection owner to None. The NCD server does, the MIT Sun4 server
2213 doesn't. So we synthesize one; this means we might get two, but 2221 doesn't. So we synthesize one; this means we might get two, but
2214 that's ok, because the second one won't have any effect. */ 2222 that's ok, because the second one won't have any effect. */
2215 SELECTION_EVENT_DISPLAY (&event) = display; 2223 SELECTION_EVENT_DISPLAY (&event.sie) = display;
2216 SELECTION_EVENT_SELECTION (&event) = selection_atom; 2224 SELECTION_EVENT_SELECTION (&event.sie) = selection_atom;
2217 SELECTION_EVENT_TIME (&event) = timestamp; 2225 SELECTION_EVENT_TIME (&event.sie) = timestamp;
2218 x_handle_selection_clear ((struct input_event *) &event); 2226 x_handle_selection_clear (&event.ie);
2219 2227
2220 return Qt; 2228 return Qt;
2221} 2229}