Mercurial > hg > xemacs-beta
comparison src/select-gtk.c @ 746:b13b1b7b11f1
[xemacs-hg @ 2002-02-08 13:04:18 by wmperry]
GTK selection fixes from Eric Gillespie, Jr. <epg@pretzelnet.org>
author | wmperry |
---|---|
date | Fri, 08 Feb 2002 13:04:21 +0000 |
parents | 2d3184c89f71 |
children | 943eaba38521 |
comparison
equal
deleted
inserted
replaced
745:4aa6e26cd8ba | 746:b13b1b7b11f1 |
---|---|
233 } | 233 } |
234 } | 234 } |
235 } | 235 } |
236 | 236 |
237 | 237 |
238 void | |
239 emacs_gtk_selection_clear_event_handle (GtkWidget *widget, | |
240 GdkEventSelection *event, | |
241 gpointer data) | |
242 { | |
243 GdkAtom selection = event->selection; | |
244 guint32 changed_owner_time = event->time; | |
245 struct device *d = decode_gtk_device (Qnil); | |
246 | |
247 Lisp_Object selection_symbol, local_selection_time_lisp; | |
248 guint32 local_selection_time; | |
249 | |
250 selection_symbol = atom_to_symbol (d, selection); | |
251 | |
252 local_selection_time_lisp = Fget_selection_timestamp (selection_symbol); | |
253 | |
254 /* We don't own the selection, so that's fine. */ | |
255 if (NILP (local_selection_time_lisp)) | |
256 return; | |
257 | |
258 local_selection_time = *(guint32 *) XOPAQUE_DATA (local_selection_time_lisp); | |
259 | |
260 /* This SelectionClear is for a selection that we no longer own, so we can | |
261 disregard it. (That is, we have reasserted the selection since this | |
262 request was generated.) | |
263 */ | |
264 if (changed_owner_time != GDK_CURRENT_TIME && | |
265 local_selection_time > changed_owner_time) | |
266 return; | |
267 | |
268 handle_selection_clear (selection_symbol); | |
269 } | |
270 | |
271 | |
238 | 272 |
239 static GtkWidget *reading_selection_reply; | 273 static GtkWidget *reading_selection_reply; |
240 static GdkAtom reading_which_selection; | 274 static GdkAtom reading_which_selection; |
241 static int selection_reply_timed_out; | 275 static int selection_reply_timed_out; |
242 | 276 |