Changeset 27089 in vbox for trunk/src/VBox
- Timestamp:
- Mar 5, 2010 1:59:37 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 58414
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
r27056 r27089 110 110 } 111 111 112 #ifdef Q_WS_X11113 bool UIMachineWindowSeamless::x11Event(XEvent *pEvent)114 {115 /* Qt bug: when the console view grabs the keyboard, FocusIn, FocusOut,116 * WindowActivate and WindowDeactivate Qt events are not properly sent117 * on top level window (i.e. this) deactivation. The fix is to substiute118 * the mode in FocusOut X11 event structure to NotifyNormal to cause119 * Qt to process it as desired. */120 if (pEvent->type == FocusOut)121 {122 if (pEvent->xfocus.mode == NotifyWhileGrabbed &&123 (pEvent->xfocus.detail == NotifyAncestor ||124 pEvent->xfocus.detail == NotifyInferior ||125 pEvent->xfocus.detail == NotifyNonlinear))126 {127 pEvent->xfocus.mode = NotifyNormal;128 }129 }130 return false;131 }132 #endif133 134 112 #ifdef Q_WS_MAC 135 113 bool UIMachineWindowSeamless::event(QEvent *pEvent) … … 149 127 } 150 128 #endif /* Q_WS_MAC */ 129 130 #ifdef Q_WS_X11 131 bool UIMachineWindowSeamless::x11Event(XEvent *pEvent) 132 { 133 /* Qt bug: when the console view grabs the keyboard, FocusIn, FocusOut, 134 * WindowActivate and WindowDeactivate Qt events are not properly sent 135 * on top level window (i.e. this) deactivation. The fix is to substiute 136 * the mode in FocusOut X11 event structure to NotifyNormal to cause 137 * Qt to process it as desired. */ 138 if (pEvent->type == FocusOut) 139 { 140 if (pEvent->xfocus.mode == NotifyWhileGrabbed && 141 (pEvent->xfocus.detail == NotifyAncestor || 142 pEvent->xfocus.detail == NotifyInferior || 143 pEvent->xfocus.detail == NotifyNonlinear)) 144 { 145 pEvent->xfocus.mode = NotifyNormal; 146 } 147 } 148 return false; 149 } 150 #endif 151 151 152 152 void UIMachineWindowSeamless::closeEvent(QCloseEvent *pEvent) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h
r27056 r27089 56 56 57 57 /* Event handlers: */ 58 #ifdef Q_WS_MAC 59 bool event(QEvent *pEvent); 60 #endif /* Q_WS_MAC */ 58 61 #ifdef Q_WS_X11 59 62 bool x11Event(XEvent *pEvent); 60 63 #endif /* Q_WS_X11 */ 61 64 void closeEvent(QCloseEvent *pEvent); 62 #ifdef Q_WS_MAC63 bool event(QEvent *pEvent);64 #endif /* Q_WS_MAC */65 65 66 66 /* Prepare helpers: */
Note:
See TracChangeset
for help on using the changeset viewer.