void *eventlogstuff;
char *progname, **gtkargvstart;
int ngtkargs;
+ guint32 input_event_time; /* Timestamp of the most recent input event. */
};
struct draw_ctx {
wchar_t ucsoutput[2];
int ucsval, start, end, special, use_ucsoutput;
+ /* Remember the timestamp. */
+ inst->input_event_time = event->time;
+
/* By default, nothing is generated. */
end = start = 0;
special = use_ucsoutput = FALSE;
struct gui_data *inst = (struct gui_data *)data;
int shift, ctrl, alt, x, y, button, act;
+ /* Remember the timestamp. */
+ inst->input_event_time = event->time;
+
show_mouseptr(inst, 1);
if (event->button == 4 && event->type == GDK_BUTTON_PRESS) {
struct gui_data *inst = (struct gui_data *)data;
int shift, ctrl, alt, x, y, button;
+ /* Remember the timestamp. */
+ inst->input_event_time = event->time;
+
show_mouseptr(inst, 1);
shift = event->state & GDK_SHIFT_MASK;
}
if (gtk_selection_owner_set(inst->area, GDK_SELECTION_PRIMARY,
- GDK_CURRENT_TIME)) {
+ inst->input_event_time)) {
gtk_selection_add_target(inst->area, GDK_SELECTION_PRIMARY,
GDK_SELECTION_TYPE_STRING, 1);
if (inst->pasteout_data_ctext)
gpointer data)
{
struct gui_data *inst = (struct gui_data *)data;
+
term_deselect(inst->term);
if (inst->pasteout_data)
sfree(inst->pasteout_data);
* fall back to an ordinary string.
*/
gtk_selection_convert(inst->area, GDK_SELECTION_PRIMARY,
- utf8_string_atom, GDK_CURRENT_TIME);
+ utf8_string_atom,
+ inst->input_event_time);
} else {
/*
* If we're in direct-to-font mode, we disable UTF-8
* pasting, and go straight to ordinary string data.
*/
gtk_selection_convert(inst->area, GDK_SELECTION_PRIMARY,
- GDK_SELECTION_TYPE_STRING, GDK_CURRENT_TIME);
+ GDK_SELECTION_TYPE_STRING,
+ inst->input_event_time);
}
}
* text next.
*/
gtk_selection_convert(inst->area, GDK_SELECTION_PRIMARY,
- compound_text_atom, GDK_CURRENT_TIME);
+ compound_text_atom,
+ inst->input_event_time);
return;
}
* string.
*/
gtk_selection_convert(inst->area, GDK_SELECTION_PRIMARY,
- GDK_SELECTION_TYPE_STRING, GDK_CURRENT_TIME);
+ GDK_SELECTION_TYPE_STRING,
+ inst->input_event_time);
return;
}
* Compound text failed; fall back to STRING.
*/
gtk_selection_convert(inst->area, GDK_SELECTION_PRIMARY,
- GDK_SELECTION_TYPE_STRING, GDK_CURRENT_TIME);
+ GDK_SELECTION_TYPE_STRING,
+ inst->input_event_time);
return;
}
text = list[0];