[mcclim-cvs] CVS update: mcclim/text-selection.lisp
Andy Hefner
ahefner at common-lisp.net
Sun Feb 27 23:07:41 UTC 2005
Update of /project/mcclim/cvsroot/mcclim
In directory common-lisp.net:/tmp/cvs-serv23633
Modified Files:
text-selection.lisp
Log Message:
Attempt to fix some issues with text selection. Send Latin 1 in response to
:STRING and :COMPOUND_TEXT requests, request selections as :STRING by
default, fall back to cut buffer contents when a selection-notify event
does not supply a property.
Date: Mon Feb 28 00:07:39 2005
Author: ahefner
Index: mcclim/text-selection.lisp
diff -u mcclim/text-selection.lisp:1.4 mcclim/text-selection.lisp:1.5
--- mcclim/text-selection.lisp:1.4 Mon Feb 14 17:31:41 2005
+++ mcclim/text-selection.lisp Mon Feb 28 00:07:36 2005
@@ -72,10 +72,10 @@
(defgeneric bind-selection (port window &optional time)
(:documentation "Take ownership of the selection."))
-(defgeneric send-selection (request-event string)
+(defgeneric send-selection (port request-event string)
(:documentation "Send 'string' to a client in response to a selection-request-event."))
-(defgeneric get-selection-from-event (event)
+(defgeneric get-selection-from-event (port event)
(:documentation "Given a selection-notify event, return a string containing
the incoming selection."))
@@ -244,9 +244,7 @@
: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)))))
(defun repaint-markings (pane old-markings new-markings)
(let ((old-region (reduce #'region-union (mapcar #'(lambda (x) (marking-region pane x)) old-markings)
@@ -377,18 +375,18 @@
;;;; Selections Events
(defmethod dispatch-event :around ((pane cut-and-paste-mixin #|extended-output-stream|#)
- (event selection-clear-event))
+ (event selection-clear-event))
(pane-clear-markings pane (event-timestamp event)))
(defmethod dispatch-event :around ((pane cut-and-paste-mixin #|extended-output-stream|#)
- (event selection-request-event))
- (send-selection event (fetch-selection pane)))
+ (event selection-request-event))
+ (send-selection (port pane) event (fetch-selection pane)))
(defmethod dispatch-event :around ((pane cut-and-paste-mixin #|extended-output-stream|#)
(event selection-notify-event))
- (let ((matter (get-selection-from-event event)))
+ (let ((matter (get-selection-from-event (port pane) event)))
#+NIL
(format *trace-output* "Got ~S.~%" matter)
(loop for c across matter do
More information about the Mcclim-cvs
mailing list