X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/c39e73975f7371a6458cd63967d39ba77a1e871a..ce8171797dafbde765170b79e5f154afc4872e86:/src/xselect.c?ds=sidebyside diff --git a/src/xselect.c b/src/xselect.c index e5f2e214fb..28f2d770a7 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -1,5 +1,5 @@ /* 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. @@ -318,9 +318,9 @@ x_own_selection (Lisp_Object selection_name, Lisp_Object selection_value, { struct frame *f = XFRAME (frame); Window selecting_window = FRAME_X_WINDOW (f); - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (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 (); @@ -972,7 +972,6 @@ x_handle_selection_clear (struct input_event *event) Frun_hook_with_args (2, args); } - prepare_menu_bars (); redisplay_preserve_echo_area (20); } @@ -997,7 +996,7 @@ x_clear_frame_selections (struct frame *f) { Lisp_Object frame; Lisp_Object rest; - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); struct terminal *t = dpyinfo->terminal; XSETFRAME (frame, f); @@ -1141,7 +1140,7 @@ wait_for_property_change (struct prop_location *location) /* Called from XTread_socket in response to a PropertyNotify event. */ void -x_handle_property_notify (XPropertyEvent *event) +x_handle_property_notify (const XPropertyEvent *event) { struct prop_location *rest; @@ -1185,10 +1184,10 @@ x_get_foreign_selection (Lisp_Object selection_symbol, Lisp_Object target_type, Lisp_Object time_stamp, Lisp_Object frame) { struct frame *f = XFRAME (frame); - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + 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) @@ -1888,7 +1887,7 @@ clean_local_selection_data (Lisp_Object obj) We store t there if the reply is successful, lambda if not. */ void -x_handle_selection_notify (XSelectionEvent *event) +x_handle_selection_notify (const XSelectionEvent *event) { if (event->requestor != reading_selection_window) return; @@ -2009,7 +2008,7 @@ On Nextstep, TIME-STAMP and TERMINAL are unused. */) error ("X selection unavailable for this frame"); val = x_get_local_selection (selection_symbol, target_type, 1, - FRAME_X_DISPLAY_INFO (f)); + FRAME_DISPLAY_INFO (f)); if (NILP (val) && FRAME_LIVE_P (f)) { @@ -2056,7 +2055,7 @@ On MS-DOS, all this does is return non-nil if we own the selection. */) if (!f) return Qnil; - dpyinfo = FRAME_X_DISPLAY_INFO (f); + dpyinfo = FRAME_DISPLAY_INFO (f); CHECK_SYMBOL (selection); /* Don't disown the selection when we're not the owner. */ @@ -2067,7 +2066,7 @@ On MS-DOS, all this does is return non-nil if we own the selection. */) 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); @@ -2108,7 +2107,7 @@ On Nextstep, TERMINAL is unused. */) if (EQ (selection, Qnil)) selection = QPRIMARY; if (EQ (selection, Qt)) selection = QSECONDARY; - if (f && !NILP (LOCAL_SELECTION (selection, FRAME_X_DISPLAY_INFO (f)))) + if (f && !NILP (LOCAL_SELECTION (selection, FRAME_DISPLAY_INFO (f)))) return Qt; else return Qnil; @@ -2141,7 +2140,7 @@ On Nextstep, TERMINAL is unused. */) if (!f) return Qnil; - dpyinfo = FRAME_X_DISPLAY_INFO (f); + dpyinfo = FRAME_DISPLAY_INFO (f); if (!NILP (LOCAL_SELECTION (selection, dpyinfo))) return Qt; @@ -2162,7 +2161,7 @@ static Lisp_Object x_clipboard_manager_save (Lisp_Object frame) { struct frame *f = XFRAME (frame); - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); Atom data = dpyinfo->Xatom_UTF8_STRING; XChangeProperty (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), @@ -2212,7 +2211,7 @@ x_clipboard_manager_save_frame (Lisp_Object frame) && (f = XFRAME (frame), FRAME_X_P (f)) && FRAME_LIVE_P (f)) { - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); Lisp_Object local_selection = LOCAL_SELECTION (QCLIPBOARD, dpyinfo); @@ -2365,7 +2364,7 @@ x_fill_property_data (Display *dpy, Lisp_Object data, void *ret, int format) 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) @@ -2458,7 +2457,7 @@ FRAME is on. If FRAME is nil, the selected frame is used. */) Atom x_atom; struct frame *f = decode_window_system_frame (frame); ptrdiff_t i; - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); if (SYMBOLP (atom)) @@ -2488,7 +2487,7 @@ FRAME is on. If FRAME is nil, the selected frame is used. */) /* Convert an XClientMessageEvent to a Lisp event of type DRAG_N_DROP_EVENT. */ int -x_handle_dnd_message (struct frame *f, XClientMessageEvent *event, +x_handle_dnd_message (struct frame *f, const XClientMessageEvent *event, struct x_display_info *dpyinfo, struct input_event *bufp) { Lisp_Object vec;