提交 dfd92d3a 编写于 作者: B bellard

reset key modifiers when switching console (aka savevm keyboard bug)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2112 c046a42c-6fe2-441c-8c8c-71466251a162
上级 4c279bdf
...@@ -394,6 +394,8 @@ static void sdl_refresh(DisplayState *ds) ...@@ -394,6 +394,8 @@ static void sdl_refresh(DisplayState *ds)
gui_keysym = 1; gui_keysym = 1;
break; break;
case 0x02 ... 0x0a: /* '1' to '9' keys */ case 0x02 ... 0x0a: /* '1' to '9' keys */
/* Reset the modifiers sent to the current console */
reset_keys();
console_select(keycode - 0x02); console_select(keycode - 0x02);
if (!is_graphic_console()) { if (!is_graphic_console()) {
/* display grab if going to a text console */ /* display grab if going to a text console */
...@@ -468,7 +470,7 @@ static void sdl_refresh(DisplayState *ds) ...@@ -468,7 +470,7 @@ static void sdl_refresh(DisplayState *ds)
} }
} }
} }
if (is_graphic_console()) if (is_graphic_console() && !gui_keysym)
sdl_process_key(&ev->key); sdl_process_key(&ev->key);
break; break;
case SDL_QUIT: case SDL_QUIT:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册