1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-07 12:20:39 -08:00
Commit graph

149 commits

Author SHA1 Message Date
Andreas Schwab
31df61d662 (Fx_disown_selection_internal): Use union of struct
input_event and struct selection_input_event to avoid aliasing
issues.
2005-02-17 12:50:08 +00:00
Kenichi Handa
1bd70c6e1d (lisp_data_to_selection_data): If OBJ is a non-ASCII
multibyte string, signal an error instead of aborting.
2005-02-14 00:59:42 +00:00
Jan Djärv
b8d6f4af97 * xselect.c (selection_data_to_lisp_data): For the special case
type == XA_ATOM, data contains array of int, not array of Atom.
(x_property_data_to_lisp, selection_data_to_lisp_data): Comment
update: data must be array of int for format == 32.
2005-02-08 21:27:01 +00:00
Jan Djärv
e22cf39c66 * xselect.c (x_reply_selection_request): Pass long array to
XChangeProperty so that 64 bit longs are handeled correctly.
(x_get_window_property): If format is 32 and long is bigger than 32
bits convert data from XGetWindowProperty from long array to int array.
(lisp_data_to_selection_data): When the input is a vector and the
format is 32, allocate a long array even if long is bigger than 32 bits.
(x_fill_property_data): Use char, short and long as the man page
for XChangeProperty specifies.  This way the data returned is OK for
both 32 and 64 bit machines.
(x_handle_dnd_message): Calculate size correctly even for 64 bit
machines.
(Fx_send_client_event): Undo change from 2005-02-05,
x_fill_property_data now handles that case.
2005-02-07 19:59:36 +00:00
Jan Djärv
31f16913d7 * xselect.c (Fx_send_client_event, x_handle_dnd_message): Handle
the longs in a XClientMessageEvent correctly when long is 64 bits.
2005-02-05 16:41:38 +00:00
Jan Djärv
ff59904afe * gtkutil.c (xg_gtk_scroll_destroy, xg_create_scroll_bar)
(xg_tool_bar_callback, xg_tool_bar_help_callback)
(update_frame_tool_bar): Cast to EMACS_INT to avoid compiler
warning.

* xselect.c (x_get_foreign_selection, x_fill_property_data)
(Fx_get_atom_name, Fx_send_client_event): Replace XFLOAT with
XFLOAT_DATA to get extract number from Lisp object.
2005-01-07 16:59:57 +00:00
Kenichi Handa
3f6b532c90 (Fx_get_cut_buffer_internal): Return a unibyte string. 2004-12-22 06:32:30 +00:00
Kim F. Storm
678b3958be Include <sys/types.h> and <unistd.h> (for getpid).
Fix various comments referring to XEvents instead of input events.
(x_queue_event): Fix format strings.
(x_stop_queuing_selection_requests): Likewise.
2004-11-09 13:26:58 +00:00
Kim F. Storm
dd0fe424b2 * xselect.c (struct selection_event_queue, selection_queue)
(x_queue_selection_requests, x_queue_event)
(x_start_queuing_selection_requests)
(x_stop_queuing_selection_requests): Add new queue for selection
input events to replace previous XEvent queue in xterm.c.
(queue_selection_requests_unwind): Adapt to new queue.
(x_reply_selection_request): Adapt to new queue.  Unexpect
wait_object in case of x errors (memory leak).
(x_handle_selection_request, x_handle_selection_clear): Make static.
(x_handle_selection_event): New function.  May queue selection events.
(wait_for_property_change_unwind): Use save_value instead of cons.
Clear property_change_reply_object.
(wait_for_property_change): Abort if already waiting.
Use save_value instead of cons for unwind data.
(x_handle_property_notify): Skip events already arrived, but don't
free them, as "arrived" field is checked by wait_for_property_change,
and it will be freed by unwind or explicit unexpect_property_change.
(x_get_foreign_selection): Add to new queue.
(receive_incremental_selection): Don't unexpect wait_object when done
as it has already been freed by previous wait_for_property_change.
2004-11-05 11:30:31 +00:00
Jan Djärv
9c3ad9e13b * xselect.c (TRACE3): New debug macro.
(x_reply_selection_request): Use it.
(receive_incremental_selection): In call to TRACE0, the name of
a symbol is in xname.
2004-11-05 07:05:13 +00:00
Stefan Monnier
c917a8de07 (Vx_lost_selection_functions, Vx_sent_selection_functions):
Rename from Vx_lost_selection_hooks and Vx_sent_selection_hooks.
(x_handle_selection_request, x_handle_selection_clear)
(x_clear_frame_selections, syms_of_xselect): Adjust accordingly.
2004-10-28 23:28:20 +00:00
Jan Djärv
0608b1a02e Must BLOCK/UNBLOCK around x_uncatch_errors. 2004-09-10 18:56:29 +00:00
Jan Djärv
844fc08505 * xselect.c (x_reply_selection_request): XSync and UNBLOCK before
x_uncatch_errors so that possible protocol errors are delivered.
2004-09-10 18:04:19 +00:00
Kim F. Storm
d64b707cb1 Rename wait_reading_process_input to wait_reading_process_output. 2004-08-20 10:34:12 +00:00
Kim F. Storm
bb41f093dd Adapt to new wait_reading_process_input args. 2004-08-19 13:59:28 +00:00
Kim F. Storm
a0ecb2ac8e Update copyright. 2004-06-16 15:10:55 +00:00
Stefan Monnier
d2f1499943 Lisp_Object/int mixup. 2004-02-16 04:53:28 +00:00
Jan Djärv
3a42401d9d * xselect.c (x_get_foreign_selection): Add new optional parameter
time_stamp.
(Fx_get_selection_internal): Ditto, pass time_stamp to
x_get_foreign_selection.
2004-02-10 17:19:14 +00:00
Jan Djärv
5b698285fa * xselect.c: Include stdio,h. 2004-02-05 02:42:14 +00:00
Jan Djärv
1fb3821bbd * xselect.c: Include termhooks.h and X11/Xproto.h
(x_check_property_data, x_fill_property_data)
(x_property_data_to_lisp, mouse_position_for_drop)
(Fx_get_atom_name, x_handle_dnd_message): New functions for DND support.
(Fx_send_client_event): Moved here from xfns.c.
(syms_of_xselect): Add Sx_get_atom_name and Sx_send_client_message.
2004-02-03 16:34:57 +00:00
Miles Bader
ab5796a9f9 Add arch taglines 2003-09-01 15:45:59 +00:00
Kenichi Handa
e57ad4d894 Don't include cahrset.h, coding.h, composite.h.
(Qforeign_selection): New variable.
(syms_of_xselect): Intern and static it.
(selection_data_to_lisp_data): Return a unibyte string made from
data with `foreign-selection' text property.
2003-06-17 10:51:11 +00:00
Richard M. Stallman
4f06187ff2 (x_handle_selection_request): Move UNGCPRO to very end. 2003-04-06 20:35:06 +00:00
Andreas Schwab
2f51feb82d (selection_data_to_lisp_data): Use int instead of
long for an integer of size 4.
2003-03-12 23:48:40 +00:00
Richard M. Stallman
ceabd2726c Comment change. 2003-01-06 01:10:25 +00:00
Juanma Barranquero
f8f8d46438 (syms_of_xselect): Fix spacing. 2002-09-06 09:05:22 +00:00
Kenichi Handa
5109c8dd99 (QUTF8_STRING): New variable.
(symbol_to_x_atom): Pay attention to QUTF8_STRING.
(x_atom_to_symbol): Likewise.
(x_get_local_selection): New argument local_request.  If it is
nonzero, call handler_fn with the second arg nil.
(x_handle_selection_request): Call x_get_local_selection with
local_request 0.
(lisp_data_to_selection_data): Don't encode the string here.
(Fx_get_selection_internal): Call x_get_local_selection with
local_request 1.
(syms_of_xselect): Intern and staticpro QUTF8_STRING.
2002-08-14 00:58:39 +00:00
Ken Raeburn
d5db40779d Most uses of XSTRING combined with STRING_BYTES or indirection changed to
SCHARS, SBYTES, STRING_INTERVALS, SREF, SDATA; explicit size_byte references
left unchanged for now.
2002-07-15 00:01:34 +00:00
Juanma Barranquero
aed1337830 Use macro SPECPDL_INDEX. 2002-07-11 14:18:02 +00:00
Juanma Barranquero
331379bfa7 Rename BINDING_STACK_SIZE to SPECPDL_INDEX. 2002-07-10 08:45:24 +00:00
Kenichi Handa
e188533570 (selection_data_to_lisp_data): Disable composition handling. 2002-06-24 00:37:24 +00:00
Sam Steingold
1b65481e29 (lisp_data_to_selection_data): Fix last change:
*data_ret is not a Lisp string, while unibyte_string is.
2002-06-07 22:05:07 +00:00
Eli Zaretskii
9cbd5852b6 (lisp_data_to_selection_data): Fix last change: set size_ret. 2002-06-07 13:44:04 +00:00
Eli Zaretskii
8f9b87b556 (lisp_data_to_selection_data): If the requested type
is STRING, call string_make_unibyte to encode the selected text
as a string.
2002-06-05 17:38:19 +00:00
Eli Zaretskii
f326600bb8 (lisp_data_to_selection_data): Always set selection
type as string if x_encode_text returns streingp non-NULL.
2002-05-31 17:42:32 +00:00
Ken Raeburn
07e9823c69 * xselect.c (symbol_to_x_atom, x_get_foreign_selection): Use
SYMBOL_NAME and XSTRING instead of XSYMBOL and name field.
2002-05-20 08:10:41 +00:00
Eli Zaretskii
7b9ae523c5 (lisp_data_to_selection_data): Don't set selection
type if comes from the Lisp object's car.  If the selection
contains a pure ASCII text, always return QSTRING as its type.
2002-05-07 05:46:35 +00:00
Stefan Monnier
31ade731e6 Change defvar_int def and vars to use EMACS_INT instead of just int. 2002-03-04 23:41:00 +00:00
Eli Zaretskii
5a79ea57c6 (Qcompound_text_with_extensions): Renamed from Qcompound_text_no_extensions.
(lisp_data_to_selection_data, syms_of_xselect): Use the new name.
2002-02-26 16:37:15 +00:00
Eli Zaretskii
ecb7ac215a (selection_data_to_lisp_data): Fix last change. 2002-02-23 08:53:27 +00:00
Eli Zaretskii
23e16093ec Fix last change. 2002-02-22 13:20:00 +00:00
Eli Zaretskii
fbbe0aceda <Qcompound_text_with_extensions>: New variable.
(syms_of_xselect): Intern and staticpro it.
(selection_data_to_lisp_data): Run post-read-conversion on decoded
selection text.
(lisp_data_to_selection_data): If next-selection-coding-system is
compound-text-with-extensions, set the type of selection to be
compound-text.
2002-02-22 13:16:35 +00:00
Pavel Janík
b782650360 Update usage of CHECK_ macros (remove unused second argument). 2001-11-02 20:46:55 +00:00
Pavel Janík
8c1a1077c0 Change doc-string comments to new style' [w/doc:' keyword]. 2001-10-21 12:13:46 +00:00
Ken Raeburn
f3fbd15535 Avoid (most) uses of XCAR/XCDR as lvalues, for flexibility in experimenting
with lisp system changes.
2001-10-16 09:09:51 +00:00
Gerd Moellmann
d9c0d4a31a (x_decline_selection_request): Handle errors
caused by receivers that have vanished.

(TRACE0, TRACE1, TRACE2): New macros, defined
depending on TRACE_SELECTION.  Replace fprintfs in #if 0 with
TRACE macros to facilitate debugging.  Add additional trace
statements.
(toplevel): Add prototypes for file-local functions.
(x_atom_to_symbol): Remove DPYINFO parameter.
2001-07-12 14:38:51 +00:00
Gerd Moellmann
3007ebfbc7 Call redisplay_preserve_echo_area with additional arg. 2001-01-16 12:42:22 +00:00
Gerd Moellmann
ca29f2b87b (selection_request_dpyinfo): New variable.
(x_handle_selection_request): Set it.
(x_selection_request_lisp_error): Don't call
x_decline_selection_request if selection request's display has
been closed.
2001-01-11 16:08:55 +00:00
Gerd Moellmann
47a6ac17a1 (x_reply_selection_request): Add a comment. 2001-01-10 12:23:46 +00:00
Gerd Moellmann
1c4d2069b3 (wait_for_property_change): Update copyright. 2000-11-28 15:36:08 +00:00