[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[STUMP] Windowlist error when no managed windows
From: |
Jay Belanger |
Subject: |
[STUMP] Windowlist error when no managed windows |
Date: |
Thu, 07 Dec 2006 08:00:20 -0600 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux) |
If the windowlist command is called when there are no managed windows,
there is an error message
Error In Command 'windowlist': Asynchronous VALUE-ERROR...
I've attached a patch which fixes that.
(I'm pretty sure the patch isn't the right way to fix it, but if I'm
reporting a potential bug, I'd rather send a patch than not. Also,
I'm completely ignoring the question of why anyone would call
windowlist if there are no managed windows.)
Jay
*** user.lisp.~1.68.~ Tue Dec 5 13:40:36 2006
--- user.lisp Thu Dec 7 07:34:47 2006
***************
*** 1005,1018 ****
(define-stumpwm-command "windowlist" ()
(let* ((group (screen-current-group (current-screen)))
! (window (second (select-from-menu
! (current-screen)
! (mapcar (lambda (w)
! (list (format-expand *window-formatters*
*window-format* w) w))
! (sort-windows group))
! ""))))
! (when window
! (frame-raise-window group (window-frame window) window))))
(defun run-commands (&rest commands)
"Run each stumpwm command in sequence. This could be used if
--- 1015,1032 ----
(define-stumpwm-command "windowlist" ()
(let* ((group (screen-current-group (current-screen)))
! (wins (sort-windows group))
! (window
! (if wins
! (second (select-from-menu
! (current-screen)
! (mapcar (lambda (w)
! (list (format-expand *window-formatters*
*window-format* w) w))
! wins)
! "")))))
! (if wins
! (frame-raise-window group (window-frame window) window)
! (echo-string (group-screen group) "No Managed Windows"))))
(defun run-commands (&rest commands)
"Run each stumpwm command in sequence. This could be used if
- [STUMP] Windowlist error when no managed windows,
Jay Belanger <=