;;; -*-Scheme-*-
;;;
-;;; $Id: xterm.scm,v 1.58 1999/02/28 05:53:39 cph Exp $
+;;; $Id: xterm.scm,v 1.59 1999/12/10 17:52:16 cph Exp $
;;;
;;; Copyright (c) 1989-1999 Massachusetts Institute of Technology
;;;
(hash-table/put! table display result)
result)))))
+;;; **** In the next two procedures, we must allow TIME to be 0, even
+;;; though the ICCCM forbids this, because existing clients use that
+;;; value. An example of a broken client is GTK+ version 1.2.6.
+
(define (display/selection-record display name time)
(let ((record (hash-table/get (display/selection-records display) name #f)))
(and record
- (<= (selection-record/time record) time)
+ (or (= 0 time) (<= (selection-record/time record) time))
record)))
(define (display/delete-selection-record! display name time)
(let ((records (display/selection-records display)))
(if (let ((record (hash-table/get records name #f)))
(and record
- (<= (selection-record/time record) time)))
+ (or (= 0 time) (<= (selection-record/time record) time))))
(hash-table/remove! records name))))
(define-structure (selection-record (conc-name selection-record/))