[mcclim-cvs] CVS update: mcclim/frames.lisp mcclim/package.lisp mcclim/ports.lisp
Andy Hefner
ahefner at common-lisp.net
Tue Feb 22 03:14:28 UTC 2005
Update of /project/mcclim/cvsroot/mcclim
In directory common-lisp.net:/tmp/cvs-serv13053
Modified Files:
frames.lisp package.lisp ports.lisp
Log Message:
Fix mixed up arguments to set-port-keyboard-focus.
Renamed set-port-keyboard-focus to %set-port-keyboard-focus to avoid
confusion with the CLIM 2.0 function port-keyboard-input-focus.
Added a timestamp keyword to %set-port-keyboard-focus (not used by
any callers yet).
Added some comments about how the keyboard focus functions are connected.
Date: Tue Feb 22 04:14:26 2005
Author: ahefner
Index: mcclim/frames.lisp
diff -u mcclim/frames.lisp:1.105 mcclim/frames.lisp:1.106
--- mcclim/frames.lisp:1.105 Wed Feb 2 12:33:58 2005
+++ mcclim/frames.lisp Tue Feb 22 04:14:17 2005
@@ -1280,7 +1280,7 @@
(declare (ignore pane state)))
(defmethod (setf keyboard-input-focus) :after (focus frame)
- (set-port-keyboard-focus focus (port frame)))
+ (%set-port-keyboard-focus (port frame) focus))
(defmethod (setf client-setting) (value frame setting)
(setf (getf (client-settings frame) setting) value))
Index: mcclim/package.lisp
diff -u mcclim/package.lisp:1.47 mcclim/package.lisp:1.48
--- mcclim/package.lisp:1.47 Tue Jan 11 14:35:18 2005
+++ mcclim/package.lisp Tue Feb 22 04:14:26 2005
@@ -1942,7 +1942,7 @@
#:port-set-sheet-region
#:port-set-sheet-transformation
#:port-ungrab-pointer
- #:set-port-keyboard-focus
+ #:%set-port-keyboard-focus
#:set-sheet-pointer-cursor
#:synthesize-pointer-motion-event
#:text-style-character-width
Index: mcclim/ports.lisp
diff -u mcclim/ports.lisp:1.47 mcclim/ports.lisp:1.48
--- mcclim/ports.lisp:1.47 Sun Jul 11 21:48:16 2004
+++ mcclim/ports.lisp Tue Feb 22 04:14:26 2005
@@ -72,9 +72,26 @@
))
;; Keyboard focus is now managed per-frame rather than per-port,
-;; which makes a lot of sense. The CLIM spec suggests this in a
-;; "Minor Issue". So, redirect PORT-KEYBOARD-INPUT-FOCUS to the
-;; current application frame for compatibility.
+;; which makes a lot of sense (less sense in the presense of
+;; multiple top-level windows, but no one does that yet). The CLIM
+;; spec suggests this in a "Minor Issue". So, redirect
+;; PORT-KEYBOARD-INPUT-FOCUS to the current application frame
+;; for compatibility.
+
+;; Note: This would prevent you from using the function the
+;; function to query who currently has the focus. I don't
+;; know if this is an intended use or not.
+
+;; The big picture:
+;; PORT-KEYBOARD-INPUT-FOCUS is defined by CLIM 2.0
+;; Our default method on this delegates to KEYBOARD-INPUT-FOCUS
+;; on the current application frame.
+;; %SET-PORT-KEYBOARD-FOCUS is the function which
+;; should be implemented in a McCLIM backend and
+;; does the work of changing the focus.
+;; A method on (SETF KEYBOARD-INPUT-FOCUS) brings them together,
+;; calling %SET-PORT-KEYBOARD-FOCUS.
+
(defmethod port-keyboard-input-focus (port)
(declare (ignore port))
(when *application-frame*
@@ -84,14 +101,14 @@
(when focus
(if (pane-frame focus)
(setf (keyboard-input-focus (pane-frame focus)) focus)
- (set-port-keyboard-focus focus port))))
+ (%set-port-keyboard-focus port focus))))
;; This is not in the CLIM spec, but since (setf port-keyboard-input-focus)
;; now calls (setf keyboard-input-focus), we need something concrete the
;; backend can implement to set the focus.
-(defmethod set-port-keyboard-focus (focus port)
- (declare (ignore focus))
- (warn "SET-PORT-KEYBOARD-FOCUS is not implemented on ~W" port))
+(defmethod %set-port-keyboard-focus (port focus &key timestamp)
+ (declare (ignore focus))
+ (warn "%SET-PORT-KEYBOARD-FOCUS is not implemented on ~W" port))
(defun find-port (&key (server-path *default-server-path*))
More information about the Mcclim-cvs
mailing list