(declare-function x-get-selection-internal "xselect.c"
(selection-symbol target-type &optional time-stamp terminal))
+(declare-function x-display-set-last-user-time "xfns.c")
(defconst x-dnd-xdnd-to-action
'(("XdndActionPrivate" . private)
(intern (x-dnd-current-type window))
timestamp)))
success action)
-
+ (x-display-set-last-user-time timestamp)
(setq action (if value
(condition-case info
(x-dnd-drop-data event frame window value
timestamp
x
y)))
+ (x-display-set-last-user-time timestamp)
(x-send-client-message frame
dnd-source
frame
my-byteorder)
reply-flags
timestamp)))
+ (x-display-set-last-user-time timestamp)
(x-send-client-message frame
dnd-source
frame
(timestamp (x-dnd-get-motif-value
data 4 4 source-byteorder))
action)
-
+ (x-display-set-last-user-time timestamp)
(x-send-client-message frame
dnd-source
frame
#endif /* HAVE_GTK3 */
#endif /* USE_GTK */
+DEFUN ("x-display-set-last-user-time", Fx_display_last_user_time,
+ Sx_display_set_last_user_time, 1, 2, 0,
+ doc: /* Set the last user time of TERMINAL to TIME-OBJECT.
+TIME-OBJECT is the X server time, in milliseconds, of the last user
+interaction. This is the timestamp that `x-get-selection-internal'
+will use by default to fetch selection data.
+TERMINAL is the terminal on which the user interaction occurred. */)
+ (Lisp_Object time_object, Lisp_Object terminal)
+{
+ struct x_display_info *dpyinfo;
+ Time time;
+
+ dpyinfo = check_x_display_info (terminal);
+ CONS_TO_INTEGER (time_object, Time, time);
+
+ x_set_last_user_time_from_lisp (dpyinfo, time);
+ return Qnil;
+}
+
DEFUN ("x-internal-focus-input-context", Fx_internal_focus_input_context,
Sx_internal_focus_input_context, 1, 1, 0,
doc: /* Focus and set the client window of all focused frames' GTK input context.
defsubr (&Sx_hide_tip);
defsubr (&Sx_double_buffered_p);
defsubr (&Sx_begin_drag);
+ defsubr (&Sx_display_set_last_user_time);
tip_timer = Qnil;
staticpro (&tip_timer);
tip_frame = Qnil;
#ifdef ENABLE_CHECKING
eassert (time <= X_ULONG_MAX);
#endif
+
dpyinfo->last_user_time = time;
#ifndef USE_GTK
#endif
}
+void
+x_set_last_user_time_from_lisp (struct x_display_info *dpyinfo,
+ Time time)
+{
+ if (dpyinfo->last_user_time > time)
+ x_display_set_last_user_time (dpyinfo, time);
+}
+
/* Set S->gc to a suitable GC for drawing glyph string S in cursor
face. */
extern void x_uncatch_errors (void);
extern void x_uncatch_errors_after_check (void);
extern void x_clear_errors (Display *);
-extern void x_set_window_size (struct frame *f, bool, int, int);
-extern void x_make_frame_visible (struct frame *f);
-extern void x_make_frame_invisible (struct frame *f);
-extern void x_iconify_frame (struct frame *f);
+extern void x_set_window_size (struct frame *, bool, int, int);
+extern void x_set_last_user_time_from_lisp (struct x_display_info *, Time);
+extern void x_make_frame_visible (struct frame *);
+extern void x_make_frame_invisible (struct frame *);
+extern void x_iconify_frame (struct frame *);
extern void x_free_frame_resources (struct frame *);
extern void x_wm_set_size_hint (struct frame *, long, bool);