[clfswm-cvs] r406 - clfswm/src

Philippe Brochard pbrochard at common-lisp.net
Sun Feb 13 20:43:28 UTC 2011


Author: pbrochard
Date: Sun Feb 13 15:43:28 2011
New Revision: 406

Log:
No need to create the functions every time.

Modified:
   clfswm/src/clfswm-util.lisp
   clfswm/src/config.lisp
   clfswm/src/xlib-util.lisp

Modified: clfswm/src/clfswm-util.lisp
==============================================================================
--- clfswm/src/clfswm-util.lisp	(original)
+++ clfswm/src/clfswm-util.lisp	Sun Feb 13 15:43:28 2011
@@ -1493,7 +1493,7 @@
     (defun close-notify-window ()
       (erase-timer :refresh-notify-window)
       (setf *never-managed-window-list*
-	    (remove (list #'is-notify-window-p (raise-window-fun))
+	    (remove (list #'is-notify-window-p 'raise-window)
 		    *never-managed-window-list* :test #'equal))
       (when gc
 	(xlib:free-gcontext gc))
@@ -1532,7 +1532,7 @@
 					 :line-style :solid))
 	  (when (frame-p *current-child*)
 	    (setf current-child *current-child*)
-	    (push (list #'is-notify-window-p (raise-window-fun)) *never-managed-window-list*))
+	    (push (list #'is-notify-window-p 'raise-window) *never-managed-window-list*))
 	  (map-window window)
 	  (refresh-notify-window)
 	  (xlib:display-finish-output *display*))))))

Modified: clfswm/src/config.lisp
==============================================================================
--- clfswm/src/config.lisp	(original)
+++ clfswm/src/config.lisp	Sun Feb 13 15:43:28 2011
@@ -48,8 +48,8 @@
 ;;; CONFIG - Never managed window list
 (defparameter *never-managed-window-list*
   (list (list (equal-wm-class-fun "ROX-Pinboard") nil)
-	(list (equal-wm-class-fun "xvkbd") (raise-window-fun))
-	(list (equal-wm-name-fun "clfswm-terminal") (raise-and-focus-window-fun)))
+	(list (equal-wm-class-fun "xvkbd") 'raise-window)
+	(list (equal-wm-name-fun "clfswm-terminal") 'raise-and-focus-window))
   "Config(): CLFSWM will never manage windows of this type.
 A list of (list match-function handle-function)")
 

Modified: clfswm/src/xlib-util.lisp
==============================================================================
--- clfswm/src/xlib-util.lisp	(original)
+++ clfswm/src/xlib-util.lisp	Sun Feb 13 15:43:28 2011
@@ -403,6 +403,10 @@
   (when (xlib:window-p window)
     (xlib:set-input-focus *display* window :parent)))
 
+(defun raise-and-focus-window (window)
+  "Raise and focus."
+  (raise-window window)
+  (focus-window window))
 
 (defun no-focus ()
   "don't focus any window but still read keyboard events."
@@ -807,13 +811,3 @@
   (lambda (win)
     (when (xlib:window-p win)
       (string-equal (xlib:wm-name win) name))))
-
-(defun raise-window-fun ()
-  (lambda (win)
-    (raise-window win)))
-
-(defun raise-and-focus-window-fun ()
-  (lambda (win)
-    (raise-window win)
-    (focus-window win)))
-




More information about the clfswm-cvs mailing list