[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/01: installer: Fix click handling in popup menu.
From: |
Danny Milosavljevic |
Subject: |
01/01: installer: Fix click handling in popup menu. |
Date: |
Fri, 7 Jul 2017 15:17:06 -0400 (EDT) |
dannym pushed a commit to branch wip-installer-2
in repository guix.
commit 97eb5043afed91e9763a0524ee241fcf22a59fad
Author: Danny Milosavljevic <address@hidden>
Date: Fri Jul 7 21:16:09 2017 +0200
installer: Fix click handling in popup menu.
* gurses/form.scm (run-event-loop): Fix click handling in popup menu.
---
gurses/form.scm | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/gurses/form.scm b/gurses/form.scm
index 9d97dac..6aa1e26 100644
--- a/gurses/form.scm
+++ b/gurses/form.scm
@@ -260,24 +260,26 @@ label eq? to N"
(define (run-event-loop form menu end-status)
"Run modal event loop for FORM until END-STATUS returns something other
than #f. Return that to our caller."
+ (menu-redraw menu)
+ (menu-refresh menu)
+ (update-panels)
+ (doupdate)
(let* ((win (form-window form))
(ch (getch win)))
- (cond
+ (cond
((eqv? ch KEY_MOUSE)
(match (getmouse)
((device-id g-x g-y z button-state)
- (if (eq? 'activated (std-menu-mouse-handler menu device-id g-x g-y z
button-state))
- (end-status form #\newline)
- (run-event-loop form menu end-status)))
+ (match (std-menu-mouse-handler menu device-id g-x g-y z button-state)
+ (('menu-item-activated x)
+ (end-status form #\newline))
+ (_
+ (run-event-loop form menu end-status))))
(_ #f)))
((end-status form ch)
(end-status form ch))
(else
(std-menu-key-handler menu ch)
- (menu-redraw menu)
- (menu-refresh menu)
- (update-panels)
- (doupdate)
(run-event-loop form menu end-status)))))
(define (maybe-run-modal-popup form which)