[clfswm-cvs] r409 - in clfswm: . src
Philippe Brochard
pbrochard at common-lisp.net
Wed Feb 16 10:47:43 UTC 2011
Author: pbrochard
Date: Wed Feb 16 05:47:42 2011
New Revision: 409
Log:
src/clfswm.lisp (main-unprotected): Add a close hook. And close the notify window, the virtual keyboard and the clfswm terminal by default.
Modified:
clfswm/ChangeLog
clfswm/src/clfswm-corner.lisp
clfswm/src/clfswm.lisp
clfswm/src/config.lisp
Modified: clfswm/ChangeLog
==============================================================================
--- clfswm/ChangeLog (original)
+++ clfswm/ChangeLog Wed Feb 16 05:47:42 2011
@@ -1,3 +1,9 @@
+2011-02-16 Philippe Brochard <pbrochard at common-lisp.net>
+
+ * src/clfswm.lisp (main-unprotected): Add a close hook. And close
+ the notify window, the virtual keyboard and the clfswm terminal by
+ default.
+
2011-02-15 Philippe Brochard <pbrochard at common-lisp.net>
* src/clfswm.lisp (main-unprotected): Destroy the notify window
Modified: clfswm/src/clfswm-corner.lisp
==============================================================================
--- clfswm/src/clfswm-corner.lisp (original)
+++ clfswm/src/clfswm-corner.lisp Wed Feb 16 05:47:42 2011
@@ -104,6 +104,11 @@
(let (win)
+ (defun close-virtual-keyboard ()
+ (when win
+ (xlib:destroy-window win)
+ (xlib:display-finish-output *display*)
+ (setf win nil)))
(defun present-virtual-keyboard ()
"Present a virtual keyboard"
(setf win (generic-present-body *virtual-keyboard-cmd*
@@ -117,6 +122,11 @@
(defun equal-clfswm-terminal-id (window)
(when win
(equal (xlib:window-id window) (xlib:window-id win))))
+ (defun close-clfswm-terminal ()
+ (when win
+ (xlib:destroy-window win)
+ (xlib:display-finish-output *display*)
+ (setf win nil)))
(defun present-clfswm-terminal ()
"Hide/Unhide a terminal"
(setf win (generic-present-body *clfswm-terminal-cmd*
Modified: clfswm/src/clfswm.lisp
==============================================================================
--- clfswm/src/clfswm.lisp (original)
+++ clfswm/src/clfswm.lisp Wed Feb 16 05:47:42 2011
@@ -275,7 +275,7 @@
(ungrab-main-keys)
(xlib:destroy-window *no-focus-window*)
(xlib:free-pixmap *pixmap-buffer*)
- (close-notify-window)
+ (call-hook *close-hook*)
(xlib:close-display *display*)
#+:event-debug
(format t "~2&Unhandled events: ~A~%" *unhandled-events*))))
Modified: clfswm/src/config.lisp
==============================================================================
--- clfswm/src/config.lisp (original)
+++ clfswm/src/config.lisp Wed Feb 16 05:47:42 2011
@@ -151,6 +151,9 @@
(defparameter *init-hook* '(default-init-hook display-hello-window)
"Config(Hook group): Init hook. This hook is run just after the first root frame is created")
+(defparameter *close-hook* '(close-notify-window close-clfswm-terminal close-virtual-keyboard)
+ "Config(Hook group): Close hook. This hook is run just before closing the display")
+
(defparameter *default-nw-hook* 'default-frame-nw-hook
"Config(Hook group): Default action to do on newly created windows")
More information about the clfswm-cvs
mailing list