Changeset 37366 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jun 7, 2011 8:37:25 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 72136
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp
r37365 r37366 191 191 case UIVisualStateType_Seamless: 192 192 { 193 /* Keyboard grabbing can fail because of some keyboard shortcut is still grabbed by window manager. 194 * We can't be sure this shortcut will be released at all, so we will retry to grab keyboard for 50 times, 195 * and after we will just ignore that issue: */ 196 int cTriesLeft = 50; 197 while (cTriesLeft && XGrabKeyboard(QX11Info::display(), m_windows[m_iKeyboardCaptureViewIndex]->machineWindow()->winId(), False, GrabModeAsync, GrabModeAsync, CurrentTime)) { --cTriesLeft; } 193 /* Keyboard grabbing can fail temporarily because some keyboard shortcut is still grabbed by window manager. */ 194 if (XGrabKeyboard(QX11Info::display(), m_windows[m_iKeyboardCaptureViewIndex]->machineWindow()->winId(), False, GrabModeAsync, GrabModeAsync, CurrentTime)) 195 m_fIsKeyboardCaptured = false; 198 196 break; 199 197 } … … 212 210 213 211 /* Notify all the listeners: */ 214 emit keyboardStateChanged(keyboardState()); 212 if (m_fIsKeyboardCaptured) 213 emit keyboardStateChanged(keyboardState()); 215 214 } 216 215 }
Note:
See TracChangeset
for help on using the changeset viewer.