[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [STUMP] Intuitive Resize Patch
From: |
Burton Samograd |
Subject: |
Re: [STUMP] Intuitive Resize Patch |
Date: |
Thu, 23 Aug 2012 16:16:09 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 |
On 12-08-23 02:52 PM, Scott Jaderholm wrote:
> Burton,
>
> Thanks, I do find your resizing behavior to be much more intuitive.
>
> I think your patch introduces two style warnings, the first one seems
> to be serious.
>
> ; file: /home/scott/src/stumpwm/iresize.lisp
> ; in: DEFUN SET-RESIZE-INCREMENT
> ; (STUMPWM::UPDATE-RESIZE-MAP)
> ;
> ; caught STYLE-WARNING:
> ; The function was called with zero arguments, but wants exactly six.
>
> ; in: DEFCOMMAND (IRESIZE TILE-GROUP)
> ; (LET* ((STUMPWM::GROUP (STUMPWM:CURRENT-GROUP))
> ; (STUMPWM::FRAME (STUMPWM::TILE-GROUP-CURRENT-FRAME
> STUMPWM::GROUP))
> ; (STUMPWM::HEAD-FRAME
> ; (STUMPWM::FRAME-HEAD STUMPWM::GROUP
> ; (STUMPWM::TILE-GROUP-CURRENT-FRAME
> ; STUMPWM::GROUP)))
> ; (STUMPWM::DX (STUMPWM::FRAME-X STUMPWM::HEAD-FRAME))
> ; (STUMPWM::DH (STUMPWM::FRAME-HEIGHT STUMPWM::HEAD-FRAME))
> ; (STUMPWM::DW (STUMPWM::FRAME-WIDTH STUMPWM::HEAD-FRAME))
> ; (STUMPWM::FX (- (STUMPWM::FRAME-X STUMPWM::FRAME) STUMPWM::DX))
> ; (STUMPWM::FY (STUMPWM::FRAME-Y STUMPWM::FRAME))
> ; (STUMPWM::FH (STUMPWM::FRAME-HEIGHT STUMPWM::FRAME))
> ; (STUMPWM::FW (STUMPWM::FRAME-WIDTH STUMPWM::FRAME)))
> ; (IF (ATOM
> ; (STUMPWM::TILE-GROUP-FRAME-HEAD STUMPWM::GROUP
> ; (STUMPWM::FRAME-HEAD
> STUMPWM::GROUP
> ;
> STUMPWM::FRAME)))
> ; (STUMPWM:MESSAGE "There's only 1 frame!")
> ; (PROGN
> ; (WHEN STUMPWM:*RESIZE-HIDES-WINDOWS* (DOLIST # #))
> ; (STUMPWM:MESSAGE "Resize Frame")
> ; (STUMPWM::UPDATE-RESIZE-MAP STUMPWM::FX STUMPWM::FY STUMPWM::FH
> ; STUMPWM::FW STUMPWM::DH STUMPWM::FW)
> ; (STUMPWM::PUSH-TOP-MAP STUMPWM:*RESIZE-MAP*)
> ; (STUMPWM::DRAW-FRAME-OUTLINES STUMPWM::GROUP
> (STUMPWM:CURRENT-HEAD)))))
> ;
> ; caught STYLE-WARNING:
> ; The variable DW is defined but never used.
>
Thanks for catching those warnings; I missed the first one by not compiling
the whole file and the second...not sure how that got through. Here's another
patch to remove them:
diff --git a/iresize.lisp b/iresize.lisp
index 0cad17f..6a5886b 100644
--- a/iresize.lisp
+++ b/iresize.lisp
@@ -36,8 +36,7 @@
"Number of pixels to increment by when interactively resizing frames.")
(defun set-resize-increment (val)
- (setf *resize-increment* val)
- (update-resize-map))
+ (setf *resize-increment* val))
(defun update-resize-map (fx fy fh fw dh dw)
(let ((m (or *resize-map* (setf *resize-map* (make-sparse-keymap)))))
@@ -88,7 +87,7 @@ resizing the current frame is loaded. Hit @key{C-g},
@key{RET}, or
(dolist (f (head-frames group (current-head)))
(clear-frame f group)))
(message "Resize Frame")
- (update-resize-map fx fy fh fw dh fw)
+ (update-resize-map fx fy fh fw dh dw)
(push-top-map *resize-map*)
(draw-frame-outlines group (current-head)))
;; (setf *resize-backup* (copy-frame-tree (current-group)))
--
Burton Samograd