/* X Selection processing for Emacs.
Copyright (C) 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003,
/* X Selection processing for Emacs.
Copyright (C) 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003,
- 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GNU Emacs; see the file COPYING. If not, write to
-the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-Boston, MA 02110-1301, USA. */
+along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
= expect_property_change (display, window, reply.property,
PropertyDelete);
= expect_property_change (display, window, reply.property,
PropertyDelete);
TRACE1 ("Set %s to increment data",
XGetAtomName (display, reply.property));
/* Append the next chunk of data to the property. */
XChangeProperty (display, window, reply.property, type, format,
TRACE1 ("Set %s to increment data",
XGetAtomName (display, reply.property));
/* Append the next chunk of data to the property. */
XChangeProperty (display, window, reply.property, type, format,
- PropModeAppend, data, i / format_bytes);
- bytes_remaining -= i;
- data += i;
+ PropModeAppend, data, i);
+ bytes_remaining -= i * format_bytes;
+ if (format == 32)
+ data += i * sizeof (long);
+ else
+ data += i * format_bytes;
/* If the new selection owner is also Emacs,
don't clear the new selection. */
BLOCK_INPUT;
/* If the new selection owner is also Emacs,
don't clear the new selection. */
BLOCK_INPUT;
if (NILP (XCAR (reading_selection_reply)))
error ("Timed out waiting for reply from selection owner");
if (EQ (XCAR (reading_selection_reply), Qlambda))
if (NILP (XCAR (reading_selection_reply)))
error ("Timed out waiting for reply from selection owner");
if (EQ (XCAR (reading_selection_reply), Qlambda))
XSelectInput (display, window, STANDARD_EVENT_SET);
/* Use xfree, not XFree, because x_get_window_property
calls xmalloc itself. */
XSelectInput (display, window, STANDARD_EVENT_SET);
/* Use xfree, not XFree, because x_get_window_property
calls xmalloc itself. */
x_get_window_property (display, window, buffer_atom, &data, &bytes,
&type, &format, &size, 0);
x_get_window_property (display, window, buffer_atom, &data, &bytes,
&type, &format, &size, 0);
if (format != 8 || type != XA_STRING)
signal_error ("Cut buffer doesn't contain 8-bit data",
if (format != 8 || type != XA_STRING)
signal_error ("Cut buffer doesn't contain 8-bit data",
DEFUN ("x-rotate-cut-buffers-internal", Fx_rotate_cut_buffers_internal,
Sx_rotate_cut_buffers_internal, 1, 1, 0,
DEFUN ("x-rotate-cut-buffers-internal", Fx_rotate_cut_buffers_internal,
Sx_rotate_cut_buffers_internal, 1, 1, 0,
- doc: /* Rotate the values of the cut buffers by the given number of step.
-Positive means shift the values forward, negative means backward. */)
+ doc: /* Rotate the values of the cut buffers by N steps.
+Positive N means shift the values forward, negative means backward. */)
with the high 16 bits from the car and the lower 16 bit from the cdr. That
number is then used as a window id.
If DEST is a frame the event is sent to the outer window of that frame.
with the high 16 bits from the car and the lower 16 bit from the cdr. That
number is then used as a window id.
If DEST is a frame the event is sent to the outer window of that frame.
If DEST is the string "PointerWindow" the event is sent to the window that
contains the pointer. If DEST is the string "InputFocus" the event is
sent to the window that has the input focus.
If DEST is the string "PointerWindow" the event is sent to the window that
contains the pointer. If DEST is the string "InputFocus" the event is
sent to the window that has the input focus.