Commit dfd92d3a46c31b17fcdbd735c6f88de54bc6bd3f

Authored by bellard
1 parent 4c279bdf

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
Showing 1 changed file with 3 additions and 1 deletions
@@ -394,6 +394,8 @@ static void sdl_refresh(DisplayState *ds) @@ -394,6 +394,8 @@ static void sdl_refresh(DisplayState *ds)
394 gui_keysym = 1; 394 gui_keysym = 1;
395 break; 395 break;
396 case 0x02 ... 0x0a: /* '1' to '9' keys */ 396 case 0x02 ... 0x0a: /* '1' to '9' keys */
  397 + /* Reset the modifiers sent to the current console */
  398 + reset_keys();
397 console_select(keycode - 0x02); 399 console_select(keycode - 0x02);
398 if (!is_graphic_console()) { 400 if (!is_graphic_console()) {
399 /* display grab if going to a text console */ 401 /* 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)
468 } 470 }
469 } 471 }
470 } 472 }
471 - if (is_graphic_console()) 473 + if (is_graphic_console() && !gui_keysym)
472 sdl_process_key(&ev->key); 474 sdl_process_key(&ev->key);
473 break; 475 break;
474 case SDL_QUIT: 476 case SDL_QUIT: