Changeset 30213 in vbox
- Timestamp:
- Jun 15, 2010 6:19:26 PM (14 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 8 edited
-
UIMachineWindow.cpp (modified) (2 diffs)
-
UIMachineWindow.h (modified) (1 diff)
-
fullscreen/UIMachineWindowFullscreen.cpp (modified) (1 diff)
-
fullscreen/UIMachineWindowFullscreen.h (modified) (1 diff)
-
normal/UIMachineWindowNormal.cpp (modified) (1 diff)
-
normal/UIMachineWindowNormal.h (modified) (1 diff)
-
seamless/UIMachineWindowSeamless.cpp (modified) (1 diff)
-
seamless/UIMachineWindowSeamless.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
r29926 r30213 41 41 #include "UIMachineWindowFullscreen.h" 42 42 #include "UIMachineWindowSeamless.h" 43 44 #ifdef Q_WS_X11 45 # include <X11/Xlib.h> 46 #endif 43 47 44 48 UIMachineWindow* UIMachineWindow::create(UIMachineLogic *pMachineLogic, UIVisualStateType visualStateType, ulong uScreenId) … … 144 148 updateAppearanceOf(UIVisualElement_WindowCaption); 145 149 } 150 151 #ifdef Q_WS_X11 152 bool UIMachineWindow::x11Event(XEvent *pEvent) 153 { 154 // TODO: Check if that is still required! 155 /* Qt bug: when the machine-view grabs the keyboard, 156 * FocusIn, FocusOut, WindowActivate and WindowDeactivate Qt events are 157 * not properly sent on top level window deactivation. 158 * The fix is to substiute the mode in FocusOut X11 event structure 159 * to NotifyNormal to cause Qt to process it as desired. */ 160 if (pEvent->type == FocusOut) 161 { 162 if (pEvent->xfocus.mode == NotifyWhileGrabbed && 163 (pEvent->xfocus.detail == NotifyAncestor || 164 pEvent->xfocus.detail == NotifyInferior || 165 pEvent->xfocus.detail == NotifyNonlinear)) 166 { 167 pEvent->xfocus.mode = NotifyNormal; 168 } 169 } 170 return false; 171 } 172 #endif 146 173 147 174 void UIMachineWindow::closeEvent(QCloseEvent *pEvent) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h
r28800 r30213 70 70 71 71 /* Common machine window event handlers: */ 72 #ifdef Q_WS_X11 73 bool x11Event(XEvent *pEvent); 74 #endif 72 75 void closeEvent(QCloseEvent *pEvent); 73 76 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
r29133 r30213 147 147 bool UIMachineWindowFullscreen::x11Event(XEvent *pEvent) 148 148 { 149 /* Qt bug: when the console view grabs the keyboard, FocusIn, FocusOut, 150 * WindowActivate and WindowDeactivate Qt events are not properly sent 151 * on top level window (i.e. this) deactivation. The fix is to substiute 152 * the mode in FocusOut X11 event structure to NotifyNormal to cause 153 * Qt to process it as desired. */ 154 if (pEvent->type == FocusOut) 155 { 156 if (pEvent->xfocus.mode == NotifyWhileGrabbed && 157 (pEvent->xfocus.detail == NotifyAncestor || 158 pEvent->xfocus.detail == NotifyInferior || 159 pEvent->xfocus.detail == NotifyNonlinear)) 160 { 161 pEvent->xfocus.mode = NotifyNormal; 162 } 163 } 164 return false; 149 return UIMachineWindow::x11Event(pEvent); 165 150 } 166 151 #endif -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h
r28800 r30213 26 26 #include "QIWithRetranslateUI.h" 27 27 #include "UIMachineWindow.h" 28 #ifdef Q_WS_X1129 # include <X11/Xlib.h>30 #endif31 28 32 29 /* Local forwards */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r30014 r30213 319 319 bool UIMachineWindowNormal::x11Event(XEvent *pEvent) 320 320 { 321 /* Qt bug: when the console view grabs the keyboard, FocusIn, FocusOut, 322 * WindowActivate and WindowDeactivate Qt events are not properly sent 323 * on top level window (i.e. this) deactivation. The fix is to substiute 324 * the mode in FocusOut X11 event structure to NotifyNormal to cause 325 * Qt to process it as desired. */ 326 if (pEvent->type == FocusOut) 327 { 328 if (pEvent->xfocus.mode == NotifyWhileGrabbed && 329 (pEvent->xfocus.detail == NotifyAncestor || 330 pEvent->xfocus.detail == NotifyInferior || 331 pEvent->xfocus.detail == NotifyNonlinear)) 332 { 333 pEvent->xfocus.mode = NotifyNormal; 334 } 335 } 336 return false; 321 return UIMachineWindow::x11Event(pEvent); 337 322 } 338 323 #endif -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h
r28800 r30213 28 28 #include "QIWithRetranslateUI.h" 29 29 #include "UIMachineWindow.h" 30 #ifdef Q_WS_X1131 # include <X11/Xlib.h>32 #endif33 30 34 31 /* Local forwards */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
r29133 r30213 176 176 bool UIMachineWindowSeamless::x11Event(XEvent *pEvent) 177 177 { 178 /* Qt bug: when the console view grabs the keyboard, FocusIn, FocusOut, 179 * WindowActivate and WindowDeactivate Qt events are not properly sent 180 * on top level window (i.e. this) deactivation. The fix is to substiute 181 * the mode in FocusOut X11 event structure to NotifyNormal to cause 182 * Qt to process it as desired. */ 183 if (pEvent->type == FocusOut) 184 { 185 if (pEvent->xfocus.mode == NotifyWhileGrabbed && 186 (pEvent->xfocus.detail == NotifyAncestor || 187 pEvent->xfocus.detail == NotifyInferior || 188 pEvent->xfocus.detail == NotifyNonlinear)) 189 { 190 pEvent->xfocus.mode = NotifyNormal; 191 } 192 } 193 return false; 178 return UIMachineWindow::x11Event(pEvent); 194 179 } 195 180 #endif -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h
r28964 r30213 26 26 #include "QIWithRetranslateUI.h" 27 27 #include "UIMachineWindow.h" 28 #ifdef Q_WS_X1129 # include <X11/Xlib.h>30 #endif31 28 32 29 /* Local forwards */
Note:
See TracChangeset
for help on using the changeset viewer.

