summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f85e6f6)
handling (generally, selection request timestamps should be set to
the timestamp on the event that caused them).
git-svn-id: svn://svn.tartarus.org/sgt/putty@3408
cda61777-01e9-0310-a592-
d414129be87e
void *eventlogstuff;
char *progname, **gtkargvstart;
int ngtkargs;
void *eventlogstuff;
char *progname, **gtkargvstart;
int ngtkargs;
+ guint32 input_event_time; /* Timestamp of the most recent input event. */
wchar_t ucsoutput[2];
int ucsval, start, end, special, use_ucsoutput;
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;
/* 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;
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) {
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;
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;
show_mouseptr(inst, 1);
shift = event->state & GDK_SHIFT_MASK;
}
if (gtk_selection_owner_set(inst->area, GDK_SELECTION_PRIMARY,
}
if (gtk_selection_owner_set(inst->area, GDK_SELECTION_PRIMARY,
+ inst->input_event_time)) {
gtk_selection_add_target(inst->area, GDK_SELECTION_PRIMARY,
GDK_SELECTION_TYPE_STRING, 1);
if (inst->pasteout_data_ctext)
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;
gpointer data)
{
struct gui_data *inst = (struct gui_data *)data;
term_deselect(inst->term);
if (inst->pasteout_data)
sfree(inst->pasteout_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,
* 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,
} 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,
* text next.
*/
gtk_selection_convert(inst->area, GDK_SELECTION_PRIMARY,
- compound_text_atom, GDK_CURRENT_TIME);
+ compound_text_atom,
+ inst->input_event_time);
* string.
*/
gtk_selection_convert(inst->area, GDK_SELECTION_PRIMARY,
* string.
*/
gtk_selection_convert(inst->area, GDK_SELECTION_PRIMARY,
- GDK_SELECTION_TYPE_STRING, GDK_CURRENT_TIME);
+ GDK_SELECTION_TYPE_STRING,
+ inst->input_event_time);
* Compound text failed; fall back to STRING.
*/
gtk_selection_convert(inst->area, GDK_SELECTION_PRIMARY,
* 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];
return;
}
text = list[0];