From: Chris Hanson Date: Fri, 10 Dec 1999 17:52:16 +0000 (+0000) Subject: Add workaround for broken X selection clients, such as GTK+. X-Git-Tag: 20090517-FFI~4413 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=b1d82ef46a661f4b3a89315633b08b3320e4c62f;p=mit-scheme.git Add workaround for broken X selection clients, such as GTK+. --- diff --git a/v7/src/edwin/xterm.scm b/v7/src/edwin/xterm.scm index a9540f91c..c3f5fab32 100644 --- a/v7/src/edwin/xterm.scm +++ b/v7/src/edwin/xterm.scm @@ -1,6 +1,6 @@ ;;; -*-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 ;;; @@ -1028,17 +1028,21 @@ (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/))