- Timestamp:
- Jun 15, 2010 5:51:27 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r30114 r30211 2540 2540 { 2541 2541 if (fCapture) 2542 XGrabKeyboard(QX11Info::display(), machineWindowWrapper()->machineWindow()->winId(), False, GrabModeAsync, GrabModeAsync, CurrentTime); 2542 { 2543 /* Keyboard grabbing can fail because of some keyboard shortcut is still grabbed by window manager. 2544 * We can't be sure this shortcut will be released at all, so we will retry to grab keyboard for 50 times, 2545 * and after we will just ignore that issue: */ 2546 int cTriesLeft = 50; 2547 while (cTriesLeft && XGrabKeyboard(QX11Info::display(), machineWindowWrapper()->machineWindow()->winId(), False, GrabModeAsync, GrabModeAsync, CurrentTime)) { --cTriesLeft; } 2548 } 2543 2549 else 2544 2550 XUngrabKeyboard(QX11Info::display(), CurrentTime);
Note:
See TracChangeset
for help on using the changeset viewer.