mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
braille fixes and improvements.
curses fix, switch to cursesw. gtk bugfixes. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJYEz74AAoJEEy22O7T6HE4L7IP/01hDz1ixvOyCR31ssEfUbO7 qpcchii+8tFT2kbir/3WMt10QHnriqdhuf1loLChyPXUn96ZfoVsYi1pVJ6w2cMA VKyrobIrZUmF3NdNl6Tq7Wzv1cISZhhlV3AUXmSdWx1Mp/fP9dnGipY1Bnc9zvAA 5gyVFOCjnlwRLQqFWOWSQqQzwSZm6hIAI+3Sl33oGo56KCDY+6Lz/aNzbyWT8Dab rPaToZUvi9TqhYBk7nyFGx7ODCIkhr4oQnqkP0S4EWUXBHedXrxVgauI/0luWszu /r2gyb/pp8WzPy4V29d5DoIJlAiAYl2nDs+iRibhYbRY88j+Cw9VwbfPrGpBZC1b PdaxBZD9msRtBBcQISFMIa/XWbd4HYlcqL5uhYoLyjsUvzMAHDXCeoMyUgErr8YQ PFItBfe7Tw+Cfo9LFRJ0KzMuFyD7MQ7ZujkInNMyqusNXBJzD6R9OU4cxJAgz/xF 0N1AtDHV3i8q8dz8XifsPEwRPx8StbZO+yY+jZEBtE+uEESzJVomW6+OJZqee4WW NnvmF2KO+IpTuCsSm/48baeGiStBrLTJ5U90m7GunACdtd5lqzvcQ+fuI/W0zuki r2T/2KzqjJGC50kqVF3mMBEd2JX/mpqEugwcG6KeYD6/3jmZFxbO4t6BL7amavrI qJOEPbxETWnqHGxd3xoI =otSl -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20161028-1' into staging braille fixes and improvements. curses fix, switch to cursesw. gtk bugfixes. # gpg: Signature made Fri 28 Oct 2016 13:05:12 BST # gpg: using RSA key 0x4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/pull-ui-20161028-1: curses: Use cursesw instead of curses curses: fix left/right arrow translation ui/gtk: Fix non-working DELETE key gtk: fix compilation warning with gtk 3.22.2 Defer BrlAPI tty acquisition to when guest starts using device Add dots keypresses support to the baum braille device Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
5b2ecabaea
4 changed files with 220 additions and 145 deletions
|
@ -369,10 +369,10 @@ static void curses_setup(void)
|
|||
/* ACS_* is not constant. So, we can't initialize statically. */
|
||||
vga_to_curses['\0'] = ' ';
|
||||
vga_to_curses[0x04] = ACS_DIAMOND;
|
||||
vga_to_curses[0x0a] = ACS_RARROW;
|
||||
vga_to_curses[0x0b] = ACS_LARROW;
|
||||
vga_to_curses[0x18] = ACS_UARROW;
|
||||
vga_to_curses[0x19] = ACS_DARROW;
|
||||
vga_to_curses[0x1a] = ACS_RARROW;
|
||||
vga_to_curses[0x1b] = ACS_LARROW;
|
||||
vga_to_curses[0x9c] = ACS_STERLING;
|
||||
vga_to_curses[0xb0] = ACS_BOARD;
|
||||
vga_to_curses[0xb1] = ACS_CKBOARD;
|
||||
|
|
27
ui/gtk.c
27
ui/gtk.c
|
@ -912,9 +912,28 @@ static gboolean gd_motion_event(GtkWidget *widget, GdkEventMotion *motion,
|
|||
|
||||
if (!qemu_input_is_absolute() && s->ptr_owner == vc) {
|
||||
GdkScreen *screen = gtk_widget_get_screen(vc->gfx.drawing_area);
|
||||
int screen_width, screen_height;
|
||||
|
||||
int x = (int)motion->x_root;
|
||||
int y = (int)motion->y_root;
|
||||
|
||||
#if GTK_CHECK_VERSION(3, 22, 0)
|
||||
{
|
||||
GdkDisplay *dpy = gtk_widget_get_display(widget);
|
||||
GdkWindow *win = gtk_widget_get_window(widget);
|
||||
GdkMonitor *monitor = gdk_display_get_monitor_at_window(dpy, win);
|
||||
GdkRectangle geometry;
|
||||
gdk_monitor_get_geometry(monitor, &geometry);
|
||||
screen_width = geometry.width;
|
||||
screen_height = geometry.height;
|
||||
}
|
||||
#else
|
||||
{
|
||||
screen_width = gdk_screen_get_width(screen);
|
||||
screen_height = gdk_screen_get_height(screen);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* In relative mode check to see if client pointer hit
|
||||
* one of the screen edges, and if so move it back by
|
||||
* 200 pixels. This is important because the pointer
|
||||
|
@ -928,10 +947,10 @@ static gboolean gd_motion_event(GtkWidget *widget, GdkEventMotion *motion,
|
|||
if (y == 0) {
|
||||
y += 200;
|
||||
}
|
||||
if (x == (gdk_screen_get_width(screen) - 1)) {
|
||||
if (x == (screen_width - 1)) {
|
||||
x -= 200;
|
||||
}
|
||||
if (y == (gdk_screen_get_height(screen) - 1)) {
|
||||
if (y == (screen_height - 1)) {
|
||||
y -= 200;
|
||||
}
|
||||
|
||||
|
@ -1051,7 +1070,9 @@ static gboolean gd_text_key_down(GtkWidget *widget,
|
|||
VirtualConsole *vc = opaque;
|
||||
QemuConsole *con = vc->gfx.dcl.con;
|
||||
|
||||
if (key->length) {
|
||||
if (key->keyval == GDK_KEY_Delete) {
|
||||
kbd_put_qcode_console(con, Q_KEY_CODE_DELETE);
|
||||
} else if (key->length) {
|
||||
kbd_put_string_console(con, key->string, key->length);
|
||||
} else {
|
||||
int num = gd_map_keycode(vc->s, gtk_widget_get_display(widget),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue