Skip to content

Commit

Permalink
fix :key-seq type to work with read-from-keymap
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawn authored and Shawn committed Oct 22, 2008
1 parent 7b44953 commit 9fe89bb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion command.lisp
Expand Up @@ -285,7 +285,7 @@ then describes the symbol."
(with-focus (screen-key-window (current-screen))
(message "~a" prompt)
(nreverse (second (multiple-value-list
(read-from-keymap *top-map* #'update)))))))))
(read-from-keymap (top-maps) #'update)))))))))

(define-stumpwm-type :window-number (input prompt)
(let ((n (or (argument-pop input)
Expand Down
10 changes: 5 additions & 5 deletions events.lisp
Expand Up @@ -197,15 +197,15 @@
(let ((ml (find-mode-line-window window)))
(when ml (destroy-mode-line-window ml))))))))

(defun read-from-keymap (kmapr &optional update-fn)
"Read a sequence of keys from the user, guided by the keymap,
KMAP and return the binding or nil if the user hit an unbound sequence.
(defun read-from-keymap (kmaps &optional update-fn)
"Read a sequence of keys from the user, guided by the keymaps,
KMAPS and return the binding or nil if the user hit an unbound sequence.
The Caller is responsible for setting up the input focus."
(let* ((code-state (read-key-no-modifiers))
(code (car code-state))
(state (cdr code-state)))
(handle-keymap kmap code state nil nil update-fn)))
(handle-keymap kmaps code state nil nil update-fn)))

(defun handle-keymap (kmaps code state key-seq grab update-fn)
"Find the command mapped to the (code state) and return it."
Expand Down Expand Up @@ -595,7 +595,7 @@ the window in it's frame."
(group-button-press (screen-current-group screen) x y :root))
((setf ml (find-mode-line-window window))
(run-hook-with-args *mode-line-click-hook* ml code x y))
((setf win (find-window-by-parent window (visible-windows)))
((setf win (find-window-by-parent window (top-windows)))
(group-button-press (window-group win) x y win)))))

;; Handling event :KEY-PRESS
Expand Down

0 comments on commit 9fe89bb

Please sign in to comment.