diff options
| author | Stefan Hajnoczi <stefanha@redhat.com> | 2025-08-07 11:02:50 -0400 |
|---|---|---|
| committer | Stefan Hajnoczi <stefanha@redhat.com> | 2025-08-07 11:02:50 -0400 |
| commit | cd21ee5b27b22ae66c103d36516aa5077881aa3d (patch) | |
| tree | 0d0bfda574acc3d6dceb0c0207172005e62972b3 | |
| parent | 0fa821f1e901370b1916676eafe7e9e15803b035 (diff) | |
| parent | c7ac771ee750e37808928b62388fd27dcbf00f46 (diff) | |
| download | focaccia-qemu-cd21ee5b27b22ae66c103d36516aa5077881aa3d.tar.gz focaccia-qemu-cd21ee5b27b22ae66c103d36516aa5077881aa3d.zip | |
Merge tag 'ui-pull-request' of https://gitlab.com/marcandre.lureau/qemu into staging
UI-fix for v10.1.0-rc3 # -----BEGIN PGP SIGNATURE----- # # iQJQBAABCgA6FiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmiUez8cHG1hcmNhbmRy # ZS5sdXJlYXVAcmVkaGF0LmNvbQAKCRDa6OEJdZac5RL+D/92hJRQpHex+m5JjJGW # zpsIK1bbP+rN7waYN8YY+QpyJ8ihSvypT5tp/Qg4Q2SsGbLs1QuVrKsseDma/lVb # DRV7JFS6FbLApOx/zvTWK88stKbbzHua93H3XQS2wHIkGYCBgZ/LlK0EIjniWCOP # 2vfld0WT1FfUag6oiHO/s0fO3/uXep9RzCFAZguDd0WnU/i+qMH60Mwi35x4dIIy # XqXDlYKUBEoYV8m3WuUtqq4otttm08/5ufkkME5rt3HjrWRjnCnAsvg4Rx4RQLuk # /azEXVlFTS7FIxsjq2jLF+ZjUeysOHOLOZNKNV4h2bV+5/nvqaNxQqLt7pq+/k14 # gSv8CB1p/fxFfhnIg6x+QHEraZ25MfBafkZM7M5ocLlPPw9uAwu/5ZJBlD5vNO90 # imcDkzHGNWOYtzV03aiQ5o4jHsee/21hCiWo/XGhGfXVACxODI0RjYJwQQ7dsxqh # yEFFwMO0Z8jxPrqDL5J6i+6/IrcMgqPlYmM8/9PqDo1yNBBhaMPc5JhFpxRDPoda # suNEBXzbiR8s4CHZqcAH+8Sl7GT9s6DQOJCguOafXtHUeSa7Sr9TfNAn2X2vTEFC # PNTcDIeXiDy/liep7gpW/W/51aNTPu651tq60ZlCzGa7Fl46KhF2ginSrOhAxMHm # aGrQgkGdXWTnXlV9Awh3nJDdGw== # =1aW6 # -----END PGP SIGNATURE----- # gpg: Signature made Thu 07 Aug 2025 06:09:03 EDT # gpg: using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5 # gpg: issuer "marcandre.lureau@redhat.com" # gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [full] # gpg: aka "Marc-André Lureau <marcandre.lureau@gmail.com>" [full] # Primary key fingerprint: 87A9 BD93 3F87 C606 D276 F62D DAE8 E109 7596 9CE5 * tag 'ui-pull-request' of https://gitlab.com/marcandre.lureau/qemu: ui/curses: Fix infinite loop on windows Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| -rw-r--r-- | ui/curses.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ui/curses.c b/ui/curses.c index a39aee8762..161f78c35c 100644 --- a/ui/curses.c +++ b/ui/curses.c @@ -265,7 +265,8 @@ static int curses2foo(const int _curses2foo[], const int _curseskey2foo[], static void curses_refresh(DisplayChangeListener *dcl) { - int chr, keysym, keycode, keycode_alt; + wint_t chr = 0; + int keysym, keycode, keycode_alt; enum maybe_keycode maybe_keycode = CURSES_KEYCODE; curses_winch_check(); @@ -284,8 +285,9 @@ static void curses_refresh(DisplayChangeListener *dcl) /* while there are any pending key strokes to process */ chr = console_getch(&maybe_keycode); - if (chr == -1) + if (chr == WEOF) { break; + } #ifdef KEY_RESIZE /* this shouldn't occur when we use a custom SIGWINCH handler */ @@ -304,9 +306,9 @@ static void curses_refresh(DisplayChangeListener *dcl) /* alt or esc key */ if (keycode == 1) { enum maybe_keycode next_maybe_keycode = CURSES_KEYCODE; - int nextchr = console_getch(&next_maybe_keycode); + wint_t nextchr = console_getch(&next_maybe_keycode); - if (nextchr != -1) { + if (nextchr != WEOF) { chr = nextchr; maybe_keycode = next_maybe_keycode; keycode_alt = ALT; |