Author: junrue Date: Tue Apr 25 23:20:11 2006 New Revision: 107
Modified: trunk/src/uitoolkit/widgets/event.lisp Log: key event processing bug fix
Modified: trunk/src/uitoolkit/widgets/event.lisp ============================================================================== --- trunk/src/uitoolkit/widgets/event.lisp (original) +++ trunk/src/uitoolkit/widgets/event.lisp Tue Apr 25 23:20:11 2006 @@ -215,19 +215,18 @@ (ch (gfs::map-virtual-key wparam-lo 2)) (w (get-widget tc hwnd))) (setf (virtual-key tc) wparam-lo) - (when (and w (= ch 0)) + (when w (event-key-down (dispatcher w) w (event-time tc) wparam-lo (code-char ch)))) 0)
(defmethod process-message (hwnd (msg (eql gfs::+wm-keyup+)) wparam lparam) (declare (ignore lparam)) (let ((tc (thread-context))) - (unless (zerop (virtual-key tc)) - (let* ((wparam-lo (lo-word wparam)) - (ch (gfs::map-virtual-key wparam-lo 2)) - (w (get-widget tc hwnd))) - (when w - (event-key-up (dispatcher w) w (event-time tc) wparam-lo (code-char ch))))) + (let* ((wparam-lo (lo-word wparam)) + (ch (gfs::map-virtual-key wparam-lo 2)) + (w (get-widget tc hwnd))) + (when w + (event-key-up (dispatcher w) w (event-time tc) wparam-lo (code-char ch)))) (setf (virtual-key tc) 0)) 0)