From pbrochard at common-lisp.net Sat Oct 19 15:32:01 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Sat, 19 Oct 2013 08:32:01 -0700 (PDT) Subject: [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1212-47-gac139af Message-ID: <20131019153201.AA03E35669C@mail.common-lisp.net> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CLFSWM - A(nother) Common Lisp FullScreen Window Manager". The branch, master has been updated via ac139afed3f7d004b5c3e5ea70682a14c0819fde (commit) from 76d69f19dc7489700606a8d7ee3397fe0be8f592 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ac139afed3f7d004b5c3e5ea70682a14c0819fde Author: Philippe Brochard Date: Sat Oct 19 17:31:58 2013 +0200 Ignore incompliant wm-class strings diff --git a/src/xlib-util.lisp b/src/xlib-util.lisp index 20bcf5f..3081053 100644 --- a/src/xlib-util.lisp +++ b/src/xlib-util.lisp @@ -1017,8 +1017,10 @@ they should be windows. So use this function to make a window out of them." ;;; Windows wm class and name tests (defmacro defun-equal-wm-class (symbol class) `(defun ,symbol (window) - (when (xlib:window-p window) - (string-equal (xlib:get-wm-class window) ,class)))) + (ignore-errors ;; Ignore incompliant wm-class strings + (when (xlib:window-p window) + (string-equal (xlib:get-wm-class window) ,class))))) + (defmacro defun-equal-wm-name (symbol name) `(defun ,symbol (window) ----------------------------------------------------------------------- Summary of changes: src/xlib-util.lisp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager From pbrochard at common-lisp.net Sat Oct 19 23:19:31 2013 From: pbrochard at common-lisp.net (Philippe Brochard) Date: Sat, 19 Oct 2013 16:19:31 -0700 (PDT) Subject: [clfswm-git]CLFSWM - A(nother) Common Lisp FullScreen Window Manager branch master updated. R-1212-48-gaf50cfa Message-ID: <20131019231932.10E683566A3@mail.common-lisp.net> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CLFSWM - A(nother) Common Lisp FullScreen Window Manager". The branch, master has been updated via af50cfac18c33eb78d6730ed8d408db7598c4033 (commit) from ac139afed3f7d004b5c3e5ea70682a14c0819fde (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit af50cfac18c33eb78d6730ed8d408db7598c4033 Author: Philippe Brochard Date: Sun Oct 20 01:19:28 2013 +0200 Better handler for xlib:access-errors diff --git a/src/clfswm.lisp b/src/clfswm.lisp index ba8314b..3b6545a 100644 --- a/src/clfswm.lisp +++ b/src/clfswm.lisp @@ -25,6 +25,7 @@ (in-package :clfswm) +(defparameter *clfswm-initializing* nil) (define-handler main-mode :key-press (code state) (funcall-key-from-code *main-keys* code state)) @@ -150,8 +151,12 @@ (find error-key '(xlib:window-error xlib:drawable-error xlib:match-error))) #+:xlib-debug (format t "~&Ignoring XLib asynchronous error: ~s~%" error-key)) ((eq error-key 'xlib:access-error) - (write-line "~&Another window manager is running.") - (throw 'exit-clfswm nil)) + (if *clfswm-initializing* + (progn + (format t "~3&Another window manager is running. Exiting...~%") + (throw 'exit-clfswm nil)) + #+:xlib-debug + (format t "~&Ignoring XLib asynchronous access error: ~s~%" error-key))) ;; all other asynchronous errors are printed. (asynchronous #+:xlib-debug (format t "~&Caught Asynchronous X Error: ~s ~s" error-key key-vals)) @@ -161,6 +166,8 @@ (apply 'error error-key :display display :error-key error-key key-vals)))) + + (defun main-loop () (loop (with-xlib-protect (:main-loop nil) @@ -272,6 +279,7 @@ (defun main-unprotected (&key (display (or (getenv "DISPLAY") ":0")) protocol (read-conf-file-p t) (alternate-conf nil) error-msg) + (setf *clfswm-initializing* t) (conf-file-name alternate-conf) (when read-conf-file-p (read-conf-file)) @@ -294,6 +302,7 @@ (exit-clfswm))) (when error-msg (info-mode error-msg)) + (setf *clfswm-initializing* nil) (catch 'exit-main-loop (unwind-protect (main-loop) diff --git a/src/package.lisp b/src/package.lisp index 87ac874..a7208d9 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -164,11 +164,11 @@ It is particulary useful with CLISP/MIT-CLX.") (forced-managed-window :initarg :forced-managed-window :accessor frame-forced-managed-window :initform nil - :documentation "A list of forced managed windows (wm-name or window)") + :documentation "A list of forced managed windows (xlib:wm-name or window)") (forced-unmanaged-window :initarg :forced-unmanaged-window :accessor frame-forced-unmanaged-window :initform nil - :documentation "A list of forced unmanaged windows (wm-name or window)") + :documentation "A list of forced unmanaged windows (xlib:wm-name or window)") (show-window-p :initarg :show-window-p :accessor frame-show-window-p :initform t) (hidden-children :initarg :hidden-children :accessor frame-hidden-children :initform nil :documentation "A list of hidden children") diff --git a/src/xlib-util.lisp b/src/xlib-util.lisp index 3081053..5d8cb0f 100644 --- a/src/xlib-util.lisp +++ b/src/xlib-util.lisp @@ -103,6 +103,7 @@ Features: ~A" ;; `(progn ;; , at body)) + (declaim (inline screen-width screen-height)) (defun screen-width () ;;(xlib:screen-width *screen*)) @@ -1017,9 +1018,8 @@ they should be windows. So use this function to make a window out of them." ;;; Windows wm class and name tests (defmacro defun-equal-wm-class (symbol class) `(defun ,symbol (window) - (ignore-errors ;; Ignore incompliant wm-class strings - (when (xlib:window-p window) - (string-equal (xlib:get-wm-class window) ,class))))) + (when (xlib:window-p window) + (string-equal (xlib:get-wm-class window) ,class)))) (defmacro defun-equal-wm-name (symbol name) ----------------------------------------------------------------------- Summary of changes: src/clfswm.lisp | 13 +++++++++++-- src/package.lisp | 4 ++-- src/xlib-util.lisp | 6 +++--- 3 files changed, 16 insertions(+), 7 deletions(-) hooks/post-receive -- CLFSWM - A(nother) Common Lisp FullScreen Window Manager