[Eclipse-cvs] CVS eclipse
ihatchondo
ihatchondo at common-lisp.net
Fri Apr 23 14:42:43 UTC 2010
Update of /project/eclipse/cvsroot/eclipse
In directory cl-net:/tmp/cvs-serv27758
Modified Files:
eclipse.lisp misc.lisp wm.lisp
Log Message:
Fix: cosmetic & cleanup changes in the way of handling EOF on the xlib:display object.
--- /project/eclipse/cvsroot/eclipse/eclipse.lisp 2010/04/23 14:36:49 1.31
+++ /project/eclipse/cvsroot/eclipse/eclipse.lisp 2010/04/23 14:42:43 1.32
@@ -1,5 +1,5 @@
;;; -*- Mode: Lisp; Package: ECLIPSE-INTERNALS -*-
-;;; $Id: eclipse.lisp,v 1.31 2010/04/23 14:36:49 ihatchondo Exp $
+;;; $Id: eclipse.lisp,v 1.32 2010/04/23 14:42:43 ihatchondo Exp $
;;;
;;; ECLIPSE. The Common Lisp Window Manager.
;;; Copyright (C) 2002 Iban HATCHONDO
@@ -276,10 +276,8 @@
(mp::start-lisp-connection-listener :port 6789 :password "clara"))
(unwind-protect
- (catch 'end
- (handler-bind ((end-of-file #'handle-end-of-file-condition))
- (eclipse-internal-loop)))
- (progn
- (ignore-errors (xlib:close-display *display*))
- (format t "Eclipse exited. Bye.~%")
- (quit))))
+ (handler-case (eclipse-internal-loop)
+ (end-of-file (c) (handle-end-of-file-condition c)))
+ (ignore-errors (xlib:close-display *display*))
+ (format t "Eclipse exited. Bye.~%")
+ (quit)))
--- /project/eclipse/cvsroot/eclipse/misc.lisp 2010/04/02 09:57:53 1.48
+++ /project/eclipse/cvsroot/eclipse/misc.lisp 2010/04/23 14:42:43 1.49
@@ -1,5 +1,5 @@
;;; -*- Mode: Lisp; Package: ECLIPSE-INTERNALS -*-
-;;; $Id: misc.lisp,v 1.48 2010/04/02 09:57:53 ihatchondo Exp $
+;;; $Id: misc.lisp,v 1.49 2010/04/23 14:42:43 ihatchondo Exp $
;;;
;;; This file is part of Eclipse.
;;; Copyright (C) 2002 Iban HATCHONDO
@@ -71,7 +71,7 @@
,(unless return `(throw ',(or throw type) ,@(or body '(nil))))))
(make-error-handler (error :return t))
-(make-error-handler (end-of-file :throw end))
+(make-error-handler (end-of-file :return t))
;;;; Window hashtable
;; Wrapper functions over hashtable using xlib:window as hash keys.
--- /project/eclipse/cvsroot/eclipse/wm.lisp 2010/04/02 09:57:53 1.61
+++ /project/eclipse/cvsroot/eclipse/wm.lisp 2010/04/23 14:42:43 1.62
@@ -1,5 +1,5 @@
;;; -*- Mode: Lisp; Package: ECLIPSE-INTERNALS -*-
-;;; $Id: wm.lisp,v 1.61 2010/04/02 09:57:53 ihatchondo Exp $
+;;; $Id: wm.lisp,v 1.62 2010/04/23 14:42:43 ihatchondo Exp $
;;;
;;; ECLIPSE. The Common Lisp Window Manager.
;;; Copyright (C) 2000, 2001, 2002 Iban HATCHONDO
@@ -770,34 +770,33 @@
(xlib:query-tree *root-window*))))
;; Main loop
(loop
- (catch 'general-error
- (handler-case
- (let ((event (get-next-event *display* :discard-p t :timeout 2)))
- (when event
- (with-slots (event-window) event
- (event-process event (lookup-widget event-window)))
- (xlib:display-finish-output *display*))
- (when pt:preprogrammed-tasks (pt:execute-preprogrammed-tasks))
- (with-slots (sm-conn) *root*
- (when sm-conn (handle-session-manager-request sm-conn *root*)))
- (case exit
- (1 (loop for val being each hash-value in *widget-table*
- when (application-p val)
- if close-display-p do (close-widget val)
- else do (undecore-application val))
+ (handler-case
+ (let ((event (get-next-event *display* :discard-p t :timeout 2)))
+ (when event
+ (with-slots (event-window) event
+ (event-process event (lookup-widget event-window)))
+ (xlib:display-finish-output *display*))
+ (when pt:preprogrammed-tasks (pt:execute-preprogrammed-tasks))
+ (with-slots (sm-conn) *root*
+ (when sm-conn (handle-session-manager-request sm-conn *root*)))
+ (case exit
+ (1 (loop for val being each hash-value in *widget-table*
+ when (application-p val)
+ if close-display-p do (close-widget val)
+ else do (undecore-application val))
(setf exit 2))
- (2 (when (root-sm-conn *root*)
- (close-sm-connection *root* :exit-p nil))
- (xlib:display-finish-output *display*)
- (setf (xlib:window-event-mask *root-window*) 0)
- (let ((win (netwm:net-supporting-wm-check *root-window*)))
- (xlib:destroy-window win))
- (xlib:display-finish-output *display*)
- (return))))
- (exit-eclipse (c)
- (setf close-display-p (close-application-p c))
- (setf exit 1))
- (end-of-file (c) (handle-end-of-file-condition c))
- (already-handled-xerror () nil)
- (error (c) (handle-error-condition c)))))
+ (2 (when (root-sm-conn *root*)
+ (close-sm-connection *root* :exit-p nil))
+ (xlib:display-finish-output *display*)
+ (setf (xlib:window-event-mask *root-window*) 0)
+ (let ((win (netwm:net-supporting-wm-check *root-window*)))
+ (xlib:destroy-window win))
+ (xlib:display-finish-output *display*)
+ (return))))
+ (exit-eclipse (c)
+ (setf close-display-p (close-application-p c))
+ (setf exit 1))
+ (end-of-file (c) (error c))
+ (already-handled-xerror () nil)
+ (error (c) (handle-error-condition c))))
(format t "~%Main loop exited~%")))
More information about the Eclipse-cvs
mailing list