[clfswm-cvs] CVS clfswm
pbrochard
pbrochard at common-lisp.net
Tue Jan 1 16:32:45 UTC 2008
Update of /project/clfswm/cvsroot/clfswm
In directory clnet:/tmp/cvs-serv17878
Modified Files:
ChangeLog clfswm-internal.lisp clfswm.lisp
Log Message:
Better configure-request and new window handle request
--- /project/clfswm/cvsroot/clfswm/ChangeLog 2007/12/31 16:32:41 1.8
+++ /project/clfswm/cvsroot/clfswm/ChangeLog 2008/01/01 16:32:45 1.9
@@ -1,3 +1,13 @@
+2008-01-01 Philippe Brochard <hocwp at free.fr>
+
+ * clfswm.lisp (handle-exposure): Redisplay groups on exposure
+ event but do not clear the root window.
+ (handle-configure-request): Adjust unmanaged window from there
+ request.
+
+ * clfswm-internal.lisp (process-new-window): Adjust new window
+ with the specified hints (max/min/base width/height).
+
2007-12-31 Philippe Brochard <hocwp at free.fr>
* clfswm.lisp (handle-configure-request): Send an Configuration
--- /project/clfswm/cvsroot/clfswm/clfswm-internal.lisp 2007/12/31 16:49:25 1.10
+++ /project/clfswm/cvsroot/clfswm/clfswm-internal.lisp 2008/01/01 16:32:45 1.11
@@ -1,7 +1,7 @@
;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
-;;; #Date#: Mon Dec 31 17:46:55 2007
+;;; #Date#: Tue Jan 1 17:30:30 2008
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Main functions
@@ -312,16 +312,18 @@
(get-group-size (current-group))
(let* ((hints (xlib:wm-normal-hints window))
(min-width (or (and hints (xlib:wm-size-hints-min-width hints)) 0))
- (min-height (or (and hints (xlib:wm-size-hints-min-height hints)) 0)))
- ;;(dbg min-width min-height)
- (setf (drawable-width window) (max min-width (drawable-width window))
- (drawable-height window) (max min-height (drawable-height window)))
+ (min-height (or (and hints (xlib:wm-size-hints-min-height hints)) 0))
+ (max-width (or (and hints (xlib:wm-size-hints-max-width hints)) (drawable-width *root*)))
+ (max-height (or (and hints (xlib:wm-size-hints-max-height hints)) (drawable-height *root*)))
+ (rwidth (or (and hints (or (xlib:wm-size-hints-width hints) (xlib:wm-size-hints-base-width hints)))
+ (drawable-width window)))
+ (rheight (or (and hints (or (xlib:wm-size-hints-height hints) (xlib:wm-size-hints-base-height hints)))
+ (drawable-height window))))
+ (setf (drawable-width window) (min (max min-width rwidth) max-width)
+ (drawable-height window) (min (max min-height rheight) max-height))
(setf (drawable-x window) (truncate (+ x (/ (- width (drawable-width window)) 2)))
(drawable-y window) (truncate (+ y (/ (- height (drawable-height window)) 2))))))))
- ;;(dbg (drawable-x window) (drawable-y window) (drawable-width window) (drawable-height window))
(add-window-in-group window (current-group))
- ;;(dbg (drawable-x window) (drawable-y window) (drawable-width window) (drawable-height window))
- ;;(format t "-------------------------------~%")
(netwm-add-in-client-list window))
--- /project/clfswm/cvsroot/clfswm/clfswm.lisp 2007/12/31 16:38:36 1.8
+++ /project/clfswm/cvsroot/clfswm/clfswm.lisp 2008/01/01 16:32:45 1.9
@@ -1,7 +1,7 @@
;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
-;;; #Date#: Mon Dec 31 17:34:22 2007
+;;; #Date#: Tue Jan 1 17:26:34 2008
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Main functions
@@ -87,20 +87,23 @@
(has-w (mask) (= 4 (logand mask 4)))
(has-h (mask) (= 8 (logand mask 8)))
(has-bw (mask) (= 16 (logand mask 16)))
- (has-stackmode (mask) (= 64 (logand mask 64))))
+ (has-stackmode (mask) (= 64 (logand mask 64)))
+ (adjust-from-request ()
+ (when (has-x value-mask) (setf (drawable-x window) x))
+ (when (has-y value-mask) (setf (drawable-y window) y))
+ (when (has-h value-mask) (setf (drawable-height window) height))
+ (when (has-w value-mask) (setf (drawable-width window) width))))
(handler-case
(progn
(with-state (window)
(when (has-bw value-mask)
(setf (drawable-border-width window) border-width))
- (when (member window (group-window-list (current-group)))
- (case (window-type window)
- (:normal (adapt-window-to-group window (current-group)))
- (t (when (has-x value-mask) (setf (drawable-x window) x))
- (when (has-y value-mask) (setf (drawable-y window) y))
- (when (has-h value-mask) (setf (drawable-height window) height))
- (when (has-w value-mask) (setf (drawable-width window) width)))))
- (send-configuration-notify window)
+ (if (member window (group-window-list (current-group)))
+ (case (window-type window)
+ (:normal (adapt-window-to-group window (current-group))
+ (send-configuration-notify window))
+ (t (adjust-from-request)))
+ (adjust-from-request))
(when (has-stackmode value-mask)
(case stack-mode
(:above (raise-window window))))))
@@ -154,8 +157,8 @@
(focus-group-under-mouse root-x root-y)))
(defun handle-exposure (&rest event-slots)
- (declare (ignore event-slots)))
-;; (show-all-group (current-workspace)))
+ (declare (ignore event-slots))
+ (show-all-group (current-workspace) *root* *root-gc* nil))
(defun handle-create-notify (&rest event-slots)
More information about the clfswm-cvs
mailing list