From da76ea4b4895e807fee59b424fd101d3b4579f0d Mon Sep 17 00:00:00 2001 From: frese Date: Sun, 30 Mar 2003 01:46:54 +0000 Subject: [PATCH] optimized redrawing --- src/split-wm.scm | 6 ++++-- src/titlebar.scm | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/split-wm.scm b/src/split-wm.scm index af41998..c846ee3 100644 --- a/src/split-wm.scm +++ b/src/split-wm.scm @@ -199,7 +199,8 @@ (draw-resizer r) (drag r r (button-event-x e) (button-event-y e)))) ((expose-event? e) - (draw-resizer-window) + (if (= 0 (expose-event-count e)) + (draw-resizer-window)) (idle)) ((destroy-window-event? e) #t) (else (idle)))))) @@ -222,7 +223,8 @@ (- (button-event-y e) start-y)) (idle)) ((expose-event? e) - (draw-resizer-window) + (if (= 0 (expose-event-count e)) + (draw-resizer-window)) (drag start-rect last-rect start-x start-y)) ((destroy-window-event? e) #t) (else diff --git a/src/titlebar.scm b/src/titlebar.scm index 6d792ab..ca26af9 100644 --- a/src/titlebar.scm +++ b/src/titlebar.scm @@ -43,7 +43,8 @@ (lambda (xevent) (cond ((expose-event? xevent) - (draw-titlebar tb options gc)) + (if (= 0 (expose-event-count xevent)) + (draw-titlebar tb options gc))) ((destroy-window-event? xevent) (exit))))) (wrap (receive-rv in-channel)