[clfswm-cvs] r311 - in clfswm: . src

Philippe Brochard pbrochard at common-lisp.net
Sat Sep 4 16:32:56 UTC 2010


Author: pbrochard
Date: Sat Sep  4 12:32:56 2010
New Revision: 311

Log:
src/clfswm.lisp (main-loop): Protect all xlib functions with an with-xlib-protect.

Modified:
   clfswm/ChangeLog
   clfswm/load.lisp
   clfswm/src/clfswm.lisp
   clfswm/src/xlib-util.lisp

Modified: clfswm/ChangeLog
==============================================================================
--- clfswm/ChangeLog	(original)
+++ clfswm/ChangeLog	Sat Sep  4 12:32:56 2010
@@ -1,5 +1,8 @@
 2010-09-04  Philippe Brochard  <pbrochard at common-lisp.net>
 
+	* src/clfswm.lisp (main-loop): Protect all xlib functions with an
+	with-xlib-protect.
+
 	* src/xlib-util.lisp (handle-event): use with-xlib-protect only in
 	handle-event. Add a with-simple-restart to prevent a
 	clisp/new-lisp infinite loop.

Modified: clfswm/load.lisp
==============================================================================
--- clfswm/load.lisp	(original)
+++ clfswm/load.lisp	Sat Sep  4 12:32:56 2010
@@ -32,10 +32,13 @@
 #+SBCL
 (require :asdf)
 
-#+SBCL
-(require :sb-posix)
+;;#+SBCL
+;;(require :sb-posix)
+
+;;#+SBCL
+;; (require :clx)
 
-#+(or CMU SBCL ECL)
+#+(or CMU ECL)
 (require :clx)
 
 #-ASDF

Modified: clfswm/src/clfswm.lisp
==============================================================================
--- clfswm/src/clfswm.lisp	(original)
+++ clfswm/src/clfswm.lisp	Sat Sep  4 12:32:56 2010
@@ -129,10 +129,14 @@
 (defun main-loop ()
   (loop
      (call-hook *loop-hook*)
-     (xlib:display-finish-output *display*)
-     (when (xlib:event-listen *display* *loop-timeout*)
-       (xlib:process-event *display* :handler #'handle-event))
-     (xlib:display-finish-output *display*)))
+     (with-xlib-protect
+       (xlib:display-finish-output *display*))
+     (when (with-xlib-protect
+	     (xlib:event-listen *display* *loop-timeout*))
+       (with-xlib-protect
+	 (xlib:process-event *display* :handler #'handle-event)))
+     (with-xlib-protect
+       (xlib:display-finish-output *display*))))
 
 
 

Modified: clfswm/src/xlib-util.lisp
==============================================================================
--- clfswm/src/xlib-util.lisp	(original)
+++ clfswm/src/xlib-util.lisp	Sat Sep  4 12:32:56 2010
@@ -70,7 +70,7 @@
        (progn
 	 , at body)
      ((or xlib:match-error xlib:window-error xlib:drawable-error) (c)
-       (dbg 'Ignore-xlib-error c))))
+       (dbg "Ignore Xlib Error" c ',body))))
 
 
 




More information about the clfswm-cvs mailing list