[clfswm-cvs] r56 - in clfswm: . src
pbrochard at common-lisp.net
pbrochard at common-lisp.net
Thu Mar 27 07:29:17 UTC 2008
Author: pbrochard
Date: Thu Mar 27 02:29:13 2008
New Revision: 56
Modified:
clfswm/ChangeLog
clfswm/TODO
clfswm/src/bindings.lisp
clfswm/src/clfswm-internal.lisp
clfswm/src/clfswm-layout.lisp
clfswm/src/clfswm.lisp
Log:
Do not raise windows with no-layout
Modified: clfswm/ChangeLog
==============================================================================
--- clfswm/ChangeLog (original)
+++ clfswm/ChangeLog Thu Mar 27 02:29:13 2008
@@ -1,3 +1,8 @@
+2008-03-26 Philippe Brochard <hocwp at free.fr>
+
+ * src/clfswm-internal.lisp (select-next/previous-level): Don't use show-all-children
+ -> less flickering.
+
2008-03-25 Philippe Brochard <hocwp at free.fr>
* src/clfswm-info.lisp (keys-from-list): new function.
Modified: clfswm/TODO
==============================================================================
--- clfswm/TODO (original)
+++ clfswm/TODO Thu Mar 27 02:29:13 2008
@@ -33,6 +33,8 @@
get-frame-by-name (path): return the frame that its own frame has this name if it exists such a frame
get-window-by-name (path): return the window that its own frame that its own frame has this name if it exists such a window.
+- A better algorithm to display all children (ie: raise just needed children and with less filckering)
+
MAYBE
=====
Modified: clfswm/src/bindings.lisp
==============================================================================
--- clfswm/src/bindings.lisp (original)
+++ clfswm/src/bindings.lisp Thu Mar 27 02:29:13 2008
@@ -80,15 +80,42 @@
;;; Mouse actions
+;;handle-configure-request
+
+(defun move-frame (frame orig-x orig-y)
+ (dolist (child (frame-child frame))
+ (hide-all-children child))
+ (with-slots (window) frame
+ (let ((done nil)
+ (dx (- (xlib:drawable-x window) orig-x))
+ (dy (- (xlib:drawable-y window) orig-y)))
+ (labels ((motion-notify (&rest event-slots &key root-x root-y &allow-other-keys)
+ (declare (ignore event-slots))
+ (setf (xlib:drawable-x (frame-window frame)) (+ root-x dx)
+ (xlib:drawable-y (frame-window frame)) (+ root-y dy))
+ (display-frame-info frame))
+ (handle-event (&rest event-slots &key event-key &allow-other-keys)
+ (case event-key
+ (:motion-notify (apply #'motion-notify event-slots))
+ (:button-release (setf done t)))))
+ (when frame
+ (loop until done
+ do (with-xlib-protect
+ (xlib:display-finish-output *display*)
+ (xlib:process-event *display* :handler #'handle-event)))))))
+ (show-all-children))
+
+
+
(defun mouse-click-to-focus (window root-x root-y)
"Focus the current frame or the current window father"
- (declare (ignore root-x root-y))
(let ((to-replay t)
(child window)
(father (find-father-frame window *current-root*)))
(unless father
(setf child (find-frame-window window *current-root*)
- father (find-father-frame child *current-root*)))
+ father (find-father-frame child *current-root*))
+ (move-frame child root-x root-y))
(when (and child father (focus-all-children child father))
(show-all-children)
(setf to-replay nil))
Modified: clfswm/src/clfswm-internal.lisp
==============================================================================
--- clfswm/src/clfswm-internal.lisp (original)
+++ clfswm/src/clfswm-internal.lisp Thu Mar 27 02:29:13 2008
@@ -454,19 +454,19 @@
(defun select-next-level ()
"Select the next level in frame"
- (select-current-frame nil)
+ (select-current-frame :maybe)
(when (frame-p *current-child*)
(awhen (first (frame-child *current-child*))
(setf *current-child* it)))
- (show-all-children))
+ (select-current-frame t))
(defun select-previous-level ()
"Select the previous level in frame"
(unless (equal *current-child* *current-root*)
- (select-current-frame nil)
+ (select-current-frame :maybe)
(awhen (find-father-frame *current-child*)
(setf *current-child* it))
- (show-all-children)))
+ (select-current-frame t)))
Modified: clfswm/src/clfswm-layout.lisp
==============================================================================
--- clfswm/src/clfswm-layout.lisp (original)
+++ clfswm/src/clfswm-layout.lisp Thu Mar 27 02:29:13 2008
@@ -71,7 +71,7 @@
(defmethod no-layout ((child xlib:window) father)
(with-slots (rx ry rw rh) father
- (values (1+ rx) (1+ ry) (- rw 2) (- rh 2) t)))
+ (values (1+ rx) (1+ ry) (- rw 2) (- rh 2) nil)))
(defmethod no-layout ((child frame) father)
(with-slots ((cx x) (cy y) (cw w) (ch h)) child
@@ -106,7 +106,7 @@
(round (+ (frame-ry father) (truncate (* (truncate (/ pos n)) dy)) 1))
(round (- dx 2))
(round (- dy 2))
- nil)))
+ t)))
(defun set-tile-layout ()
"Tile child in its frame"
Modified: clfswm/src/clfswm.lisp
==============================================================================
--- clfswm/src/clfswm.lisp (original)
+++ clfswm/src/clfswm.lisp Thu Mar 27 02:29:13 2008
@@ -180,7 +180,7 @@
(defun main-loop ()
(loop
(with-xlib-protect
- (xlib:display-finish-output *display*)
+ (xlib:display-finish-output *display*)
(xlib:process-event *display* :handler #'handle-event))))
;;(dbg "Main loop finish" c)))))
More information about the clfswm-cvs
mailing list