guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/03: installer: Set up timeout so we can update status displays.


From: Danny Milosavljevic
Subject: 03/03: installer: Set up timeout so we can update status displays.
Date: Wed, 5 Jul 2017 05:08:53 -0400 (EDT)

dannym pushed a commit to branch wip-installer-2
in repository guix.

commit 2f6d77c7d3d7b0f9755f6f4a558669bb16f16588
Author: Danny Milosavljevic <address@hidden>
Date:   Wed Jul 5 11:07:10 2017 +0200

    installer: Set up timeout so we can update status displays.
    
    * gnu/system/installer/guixsd-installer.scm (guixsd-installer): Modify.
---
 gnu/system/installer/guixsd-installer.scm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gnu/system/installer/guixsd-installer.scm 
b/gnu/system/installer/guixsd-installer.scm
index a00a6ae..85a9975 100644
--- a/gnu/system/installer/guixsd-installer.scm
+++ b/gnu/system/installer/guixsd-installer.scm
@@ -292,6 +292,9 @@
           (system* "dmesg" "--console-off")
           (initscr)))
 
+      ;; Set up timeout for getch so that we can update status displays.
+      (timeout! stdscr 500) ; 500 ms
+
       ;; Set up mouse
       (mousemask (logior BUTTON1_CLICKED BUTTON1_PRESSED BUTTON1_RELEASED))
 
@@ -327,8 +330,9 @@
                    (when (eq? ret 'cancelled)
                      (page-ppop))
                    (base-page-key-handler current-page ch)))
-            (let ((current-page (page-top))) ; Not necessarily the same.
-              ((page-refresh current-page) current-page)))
+            (if ch ; not #f
+              (let ((current-page (page-top))) ; Not necessarily the same.
+                ((page-refresh current-page) current-page))))
           (loop (getch stdscr)))
 
         (endwin)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]