[mcclim-cvs] CVS update: mcclim/package.lisp	mcclim/text-selection.lisp 
    Christophe Rhodes 
    crhodes at common-lisp.net
       
    Tue Mar 22 12:31:22 UTC 2005
    
    
  
Update of /project/mcclim/cvsroot/mcclim
In directory common-lisp.net:/tmp/cvs-serv31416
Modified Files:
	package.lisp text-selection.lisp 
Log Message:
I think this is a slightly more ICCCMly correct implementation of sending
selections to requestors.  We support all the required targets except
MULTIPLE, select an appropriate property if TEXT is requested, refuse to
send bad characters to a STRING target, and avoid printing to *trace-output*
to deal with the fact that Klipper, at least, polls the TIMESTAMP property
to find out if the selection has changed.
Requesting PRIMARY from selection owners is moderately broken, unfortunately;
it works for ASCII but not for much else.
Date: Tue Mar 22 13:31:19 2005
Author: crhodes
Index: mcclim/package.lisp
diff -u mcclim/package.lisp:1.48 mcclim/package.lisp:1.49
--- mcclim/package.lisp:1.48	Tue Feb 22 04:14:26 2005
+++ mcclim/package.lisp	Tue Mar 22 13:31:18 2005
@@ -1988,6 +1988,7 @@
    #:text-style-width
    ;; Text selection protocol
    #:selection-owner
+   #:selection-timestamp
    #:selection-event
    #:selection-clear-event
    #:selection-notify-event
Index: mcclim/text-selection.lisp
diff -u mcclim/text-selection.lisp:1.5 mcclim/text-selection.lisp:1.6
--- mcclim/text-selection.lisp:1.5	Mon Feb 28 00:07:36 2005
+++ mcclim/text-selection.lisp	Tue Mar 22 13:31:18 2005
@@ -244,7 +244,8 @@
                                            :sheet owner
                                            :selection :primary))))
       (when (bind-selection (port pane) pane (event-timestamp event))
-	(setf (selection-owner (port pane)) pane)))))
+	(setf (selection-owner (port pane)) pane)
+	(setf (selection-timestamp (port pane)) (event-timestamp event))))))
 
 (defun repaint-markings (pane old-markings new-markings)
   (let ((old-region (reduce #'region-union (mapcar #'(lambda (x) (marking-region pane x)) old-markings)
    
    
More information about the Mcclim-cvs
mailing list