[clfswm-cvs] r219 - in clfswm: . src
Philippe Brochard
pbrochard at common-lisp.net
Tue May 5 07:37:23 UTC 2009
Author: pbrochard
Date: Tue May 5 03:37:23 2009
New Revision: 219
Log:
src/*.lisp (*): Use map-window instead of xlib:map-window. So calls xlib:display-finish-output on each map-request. So speed up the window display.
Modified:
clfswm/ChangeLog
clfswm/src/clfswm-circulate-mode.lisp
clfswm/src/clfswm-info.lisp
clfswm/src/clfswm-internal.lisp
clfswm/src/clfswm-query.lisp
clfswm/src/clfswm-second-mode.lisp
clfswm/src/clfswm-util.lisp
clfswm/src/clfswm.lisp
clfswm/src/xlib-util.lisp
Modified: clfswm/ChangeLog
==============================================================================
--- clfswm/ChangeLog (original)
+++ clfswm/ChangeLog Tue May 5 03:37:23 2009
@@ -1,3 +1,12 @@
+2009-05-05 Philippe Brochard <pbrochard at common-lisp.net>
+
+ * src/*.lisp (*): Use map-window instead of xlib:map-window. So
+ calls xlib:display-finish-output on each map-request. So speed up
+ the window display.
+
+ * src/xlib-util.lisp (map-window): New function. Call
+ xlib:display-finish-output on each map request.
+
2009-04-28 Philippe Brochard <pbrochard at common-lisp.net>
* src/clfswm-second-mode.lisp (sm-handle-motion-notify):
Modified: clfswm/src/clfswm-circulate-mode.lisp
==============================================================================
--- clfswm/src/clfswm-circulate-mode.lisp (original)
+++ clfswm/src/clfswm-circulate-mode.lisp Tue May 5 03:37:23 2009
@@ -201,7 +201,7 @@
:background (get-color *circulate-background*)
:font *circulate-font*
:line-style :solid))
- (xlib:map-window *circulate-window*)
+ (map-window *circulate-window*)
(draw-circulate-mode-window)
(when child-direction
(reorder-child child-direction))
Modified: clfswm/src/clfswm-info.lisp
==============================================================================
--- clfswm/src/clfswm-info.lisp (original)
+++ clfswm/src/clfswm-info.lisp Tue May 5 03:37:23 2009
@@ -243,7 +243,7 @@
(handle-button-release (&rest event-slots &key window root-x root-y code state &allow-other-keys)
(declare (ignore event-slots))
(funcall-button-from-code *info-mouse* code state window root-x root-y *fun-release* (list info))))
- (xlib:map-window window)
+ (map-window window)
(draw-info-window info)
(xgrab-pointer *root* 68 69)
(unless keyboard-grabbed-p
Modified: clfswm/src/clfswm-internal.lisp
==============================================================================
--- clfswm/src/clfswm-internal.lisp (original)
+++ clfswm/src/clfswm-internal.lisp Tue May 5 03:37:23 2009
@@ -506,7 +506,7 @@
(if show-window-p
(when (or *show-root-frame-p* (not (equal frame *current-root*)))
(setf (xlib:window-background window) (get-color "Black"))
- (xlib:map-window window)
+ (map-window window)
(when raise-p (raise-window window)))
(hide-window window)))
(display-frame-info frame)))
@@ -517,7 +517,7 @@
(if (or (managed-window-p window parent)
(equal parent *current-child*))
(progn
- (xlib:map-window window)
+ (map-window window)
(when raise-p (raise-window window)))
(hide-window window))))
@@ -911,7 +911,7 @@
(format t "Processing ~S: type=~A ~S~%" (xlib:wm-name win) (window-type win) win)
(unhide-window win)
(process-new-window win)
- (xlib:map-window win)
+ (map-window win)
(raise-window win)
(pushnew (xlib:window-id win) id-list))))))
(netwm-set-client-list id-list)))
Modified: clfswm/src/clfswm-query.lisp
==============================================================================
--- clfswm/src/clfswm-query.lisp (original)
+++ clfswm/src/clfswm-query.lisp Tue May 5 03:37:23 2009
@@ -122,7 +122,7 @@
:background (get-color *query-background*)
:font *query-font*
:line-style :solid))
- (xlib:map-window *query-window*)
+ (map-window *query-window*)
(query-print-string)
(wait-no-key-or-button-press))
Modified: clfswm/src/clfswm-second-mode.lisp
==============================================================================
--- clfswm/src/clfswm-second-mode.lisp (original)
+++ clfswm/src/clfswm-second-mode.lisp Tue May 5 03:37:23 2009
@@ -211,7 +211,7 @@
:background (get-color *sm-background-color*)
:font *sm-font*
:line-style :solid))
- (xlib:map-window *sm-window*)
+ (map-window *sm-window*)
(draw-second-mode-window)
(no-focus)
(ungrab-main-keys)
Modified: clfswm/src/clfswm-util.lisp
==============================================================================
--- clfswm/src/clfswm-util.lisp (original)
+++ clfswm/src/clfswm-util.lisp Tue May 5 03:37:23 2009
@@ -118,7 +118,7 @@
(dolist (window (get-hidden-windows))
(unhide-window window)
(process-new-window window)
- (xlib:map-window window)))
+ (map-window window)))
(show-all-children))
@@ -269,7 +269,7 @@
(:exposure (print-key nil nil nil nil nil)))
t))
(xgrab-pointer *root* 92 93)
- (xlib:map-window window)
+ (map-window window)
(format t "~&Press 'q' to stop the identify loop~%")
(print-key nil nil nil nil nil)
(force-output)
@@ -522,7 +522,7 @@
parent *current-root*
mouse-fn #'resize-frame)
(place-frame child parent root-x root-y 10 10)
- (xlib:map-window (frame-window child))
+ (map-window (frame-window child))
(pushnew child (frame-child *current-root*)))
(setf child (find-frame-window window *current-root*)
parent (find-parent-frame child *current-root*)))
@@ -569,7 +569,7 @@
parent *current-root*
mouse-fn #'resize-frame)
(place-frame child parent root-x root-y 10 10)
- (xlib:map-window (frame-window child))
+ (map-window (frame-window child))
(pushnew child (frame-child *current-root*)))
(typecase child
(xlib:window
Modified: clfswm/src/clfswm.lisp
==============================================================================
--- clfswm/src/clfswm.lisp (original)
+++ clfswm/src/clfswm.lisp Tue May 5 03:37:23 2009
@@ -97,7 +97,7 @@
(unless send-event-p
(unhide-window window)
(process-new-window window)
- (xlib:map-window window)
+ (map-window window)
(unless (null-size-window-p window)
(show-all-children))))
@@ -239,7 +239,7 @@
(xgrab-init-keyboard)
(init-last-child)
(call-hook *binding-hook*)
- (xlib:map-window *no-focus-window*)
+ (map-window *no-focus-window*)
(dbg *display*)
(setf (xlib:window-event-mask *root*) (xlib:make-event-mask :substructure-redirect
:substructure-notify
Modified: clfswm/src/xlib-util.lisp
==============================================================================
--- clfswm/src/xlib-util.lisp (original)
+++ clfswm/src/xlib-util.lisp Tue May 5 03:37:23 2009
@@ -134,9 +134,15 @@
(when (window-hidden-p window)
(xlib:map-window window)
(setf (window-state window) +normal-state+
- (xlib:window-event-mask window) *window-events*)))))
+ (xlib:window-event-mask window) *window-events*))))
+ (xlib:display-finish-output *display*))
+(defun map-window (window)
+ (when window
+ (with-xlib-protect
+ (xlib:map-window window)
+ (xlib:display-finish-output *display*))))
@@ -256,7 +262,8 @@
(setf (window-state window) +iconic-state+
(xlib:window-event-mask window) (remove :structure-notify *window-events*))
(xlib:unmap-window window)
- (setf (xlib:window-event-mask window) *window-events*))))
+ (setf (xlib:window-event-mask window) *window-events*)))
+ (xlib:display-finish-output *display*))
@@ -318,13 +325,15 @@
(with-xlib-protect
(when (window-hidden-p window)
(unhide-window window))
- (setf (xlib:window-priority window) :top-if))))
+ (setf (xlib:window-priority window) :top-if)))
+ (xlib:display-finish-output *display*))
(defun focus-window (window)
"Give the window focus."
(when window
(with-xlib-protect
- (xlib:set-input-focus *display* window :parent))))
+ (xlib:set-input-focus *display* window :parent)))
+ (xlib:display-finish-output *display*))
@@ -334,7 +343,8 @@
(defun no-focus ()
"don't focus any window but still read keyboard events."
- (xlib:set-input-focus *display* *no-focus-window* :pointer-root))
+ (xlib:set-input-focus *display* *no-focus-window* :pointer-root)
+ (xlib:display-finish-output *display*))
More information about the clfswm-cvs
mailing list