diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2019-10-18 11:52:05 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2019-10-18 11:52:05 +0100 |
| commit | 51cd65b18fbb105fda1a38081053f023a32cc7a9 (patch) | |
| tree | adfe9a6875b99dc1aced8eb264da9d949a5dcd20 /ui/curses.c | |
| parent | d52932ed34e61831f2ca2cdcb217f61605e72f5d (diff) | |
| parent | 707f75070a94c28889f887deef0ab4da09e25ddf (diff) | |
| download | focaccia-qemu-51cd65b18fbb105fda1a38081053f023a32cc7a9.tar.gz focaccia-qemu-51cd65b18fbb105fda1a38081053f023a32cc7a9.zip | |
Merge remote-tracking branch 'remotes/kraxel/tags/ui-20191018-pull-request' into staging
ui: bugfixes for cocoa, curses and input-barrier. # gpg: Signature made Fri 18 Oct 2019 11:16:53 BST # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full] # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full] # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full] # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/ui-20191018-pull-request: ui: fix keymap file search in input-barrier object curses: correctly pass the color pair to setcchar() curses: use the bit mask constants provided by curses ui: Fix hanging up Cocoa display on macOS 10.15 (Catalina) Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'ui/curses.c')
| -rw-r--r-- | ui/curses.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ui/curses.c b/ui/curses.c index ec281125ac..3a1b71451c 100644 --- a/ui/curses.c +++ b/ui/curses.c @@ -75,14 +75,16 @@ static void curses_update(DisplayChangeListener *dcl, line = screen + y * width; for (h += y; y < h; y ++, line += width) { for (x = 0; x < width; x++) { - chtype ch = line[x] & 0xff; - chtype at = line[x] & ~0xff; + chtype ch = line[x] & A_CHARTEXT; + chtype at = line[x] & A_ATTRIBUTES; + short color_pair = PAIR_NUMBER(line[x]); + ret = getcchar(&vga_to_curses[ch], wch, &attrs, &colors, NULL); if (ret == ERR || wch[0] == 0) { wch[0] = ch; wch[1] = 0; } - setcchar(&curses_line[x], wch, at, 0, NULL); + setcchar(&curses_line[x], wch, at, color_pair, NULL); } mvwadd_wchnstr(screenpad, y, 0, curses_line, width); } |