VirtualBox

Changeset 28405 in vbox for trunk/src/VBox/Frontends/VBoxSDL


Ignore:
Timestamp:
Apr 16, 2010 10:37:39 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
60167
Message:

FE/SDL: When sending two key events to the guest (the first event was delayed to decide if this is part of a host key combination or not) add a small delay to work around a bug of certain guest applications (e.g. mstsc.exe on WinXP which otherwise wouldn't detect the first key event.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp

    r28205 r28405  
    23642364                                                                 : HKEYSTATE_NOT_IT;
    23652365                            ProcessKey(&EvHKeyDown1.key);
     2366                            /* ugly hack: Some guests (e.g. mstsc.exe on Windows XP)
     2367                             * expect a small delay between two key events. 5ms work
     2368                             * reliable here so use 10ms to be on the safe side. A
     2369                             * better but more complicated fix would be to introduce
     2370                             * a new state and don't wait here. */
     2371                            RTThreadSleep(10);
    23662372                            ProcessKey(&event.key);
    23672373                            break;
     
    24052411                        enmHKeyState = HKEYSTATE_NOT_IT;
    24062412                        ProcessKey(&EvHKeyDown1.key);
     2413                        /* see the comment for the 2-key case above */
     2414                        RTThreadSleep(10);
    24072415                        if (gHostKeySym2 != SDLK_UNKNOWN)
     2416                        {
    24082417                            ProcessKey(&EvHKeyDown2.key);
     2418                            /* see the comment for the 2-key case above */
     2419                            RTThreadSleep(10);
     2420                        }
    24092421                        ProcessKey(&event.key);
    24102422                        break;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette