/* X Selection processing for Emacs.
- Copyright (C) 1993-1997, 2000-2013 Free Software Foundation, Inc.
+ Copyright (C) 1993-1997, 2000-2014 Free Software Foundation, Inc.
This file is part of GNU Emacs.
Window selecting_window = FRAME_X_WINDOW (f);
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
Display *display = dpyinfo->display;
- Time timestamp = last_event_timestamp;
+ Time timestamp = dpyinfo->last_user_time;
Atom selection_atom = symbol_to_x_atom (dpyinfo, selection_name);
block_input ();
Frun_hook_with_args (2, args);
}
- prepare_menu_bars ();
redisplay_preserve_echo_area (20);
}
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
Display *display = dpyinfo->display;
Window requestor_window = FRAME_X_WINDOW (f);
- Time requestor_time = last_event_timestamp;
+ Time requestor_time = dpyinfo->last_user_time;
Atom target_property = dpyinfo->Xatom_EMACS_TMP;
Atom selection_atom = symbol_to_x_atom (dpyinfo, selection_symbol);
Atom type_atom = (CONSP (target_type)
block_input ();
if (NILP (time_object))
- timestamp = last_event_timestamp;
+ timestamp = dpyinfo->last_user_time;
else
CONS_TO_INTEGER (time_object, Time, timestamp);
XSetSelectionOwner (dpyinfo->display, selection_atom, None, timestamp);
Lisp_Object
x_property_data_to_lisp (struct frame *f, const unsigned char *data,
- Atom type, int format, long unsigned int size)
+ Atom type, int format, unsigned long size)
{
ptrdiff_t format_bytes = format >> 3;
if (PTRDIFF_MAX / format_bytes < size)
data, size * format_bytes, type, format);
}
-/* Get the mouse position in frame relative coordinates. */
-
-static void
-mouse_position_for_drop (struct frame *f, int *x, int *y)
-{
- Window root, dummy_window;
- int dummy;
-
- block_input ();
-
- XQueryPointer (FRAME_X_DISPLAY (f),
- DefaultRootWindow (FRAME_X_DISPLAY (f)),
-
- /* The root window which contains the pointer. */
- &root,
-
- /* Window pointer is on, not used */
- &dummy_window,
-
- /* The position on that root window. */
- x, y,
-
- /* x/y in dummy_window coordinates, not used. */
- &dummy, &dummy,
-
- /* Modifier keys and pointer buttons, about which
- we don't care. */
- (unsigned int *) &dummy);
-
-
- /* Absolute to relative. */
- *x -= f->left_pos + FRAME_OUTER_TO_INNER_DIFF_X (f);
- *y -= f->top_pos + FRAME_OUTER_TO_INNER_DIFF_Y (f);
-
- unblock_input ();
-}
-
DEFUN ("x-get-atom-name", Fx_get_atom_name,
Sx_get_atom_name, 1, 2, 0,
doc: /* Return the X atom name for VALUE as a string.
event->format,
size));
- mouse_position_for_drop (f, &x, &y);
+ x_relative_mouse_position (f, &x, &y);
bufp->kind = DRAG_N_DROP_EVENT;
bufp->frame_or_window = frame;
bufp->timestamp = CurrentTime;