[mcclim-cvs] CVS update: mcclim/Backends/CLX/port.lisp

Christophe Rhodes crhodes at common-lisp.net
Thu Feb 10 09:54:32 UTC 2005


Update of /project/mcclim/cvsroot/mcclim/Backends/CLX
In directory common-lisp.net:/tmp/cvs-serv25133/Backends/CLX

Modified Files:
	port.lisp 
Log Message:
encouraged by IRC feedback, commit fixes from conversation with myself
on mcclim-devel regarding ICCCM X compliance in the SetInputFocus and
selection ownership areas.

Date: Thu Feb 10 10:54:28 2005
Author: crhodes

Index: mcclim/Backends/CLX/port.lisp
diff -u mcclim/Backends/CLX/port.lisp:1.105 mcclim/Backends/CLX/port.lisp:1.106
--- mcclim/Backends/CLX/port.lisp:1.105	Fri Jan 14 13:47:47 2005
+++ mcclim/Backends/CLX/port.lisp	Thu Feb 10 10:54:27 2005
@@ -813,12 +813,16 @@
                  :timestamp time))
 
 (defmethod port-wm-protocols-message (sheet time (message (eql :wm_take_focus)) data)
-  (declare (ignore data))
+  (when time
+    (format *trace-output* "~&;; In :WM_TAKE_FOCUS, TIME is not NIL: ~S" time))
   (let* ((frame (pane-frame sheet))
-         (focus (climi::keyboard-input-focus frame)))
+         (focus (climi::keyboard-input-focus frame))
+	 ;; FIXME: Do I really have to use ELT here?  The CLX manual
+	 ;; says (sequence integer), so I suppose I do.
+	 (timestamp (elt data 1)))
     (when (and focus (sheet-mirror focus))
       (xlib:set-input-focus (clx-port-display *clx-port*)
-                            (sheet-mirror focus) :parent time)
+                            (sheet-mirror focus) :parent timestamp)
       nil)))
 
 (defmethod port-wm-protocols-message (sheet time (message t) data)
@@ -1368,13 +1372,16 @@
 (defmethod bind-selection ((port clx-port) window &optional time)
   (xlib:set-selection-owner
    (xlib:window-display (sheet-direct-mirror window))
-   :primary (sheet-direct-mirror window)))
+   :primary (sheet-direct-mirror window) time)
+  (eq (xlib:selection-owner
+       (xlib:window-display (sheet-direct-mirror window))
+       :primary)
+      (sheet-direct-mirror window)))
 
 (defmethod release-selection ((port clx-port) &optional time)
   (xlib:set-selection-owner
    (clim-clx::clx-port-display port)
-   :primary nil
-   time)
+   :primary nil time)
   (setf (selection-owner port) nil))
 
 (defmethod request-selection ((port clx-port) requestor time)




More information about the Mcclim-cvs mailing list