- Timestamp:
- May 24, 2013 3:57:03 PM (12 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
r46244 r46256 22 22 #include <QMenu> 23 23 #include <QTimer> 24 #ifdef Q_WS_MAC25 # include <QMenuBar>26 #endif /* Q_WS_MAC */27 24 28 25 /* GUI includes: */ … … 180 177 if (pFullscreenLogic->hasHostScreenForGuestScreen(m_uScreenId)) 181 178 { 182 /* Make sure the window is placed on valid screen 183 * before we are show fullscreen window: */ 179 /* Make sure the window is maximized and placed on valid screen: */ 184 180 placeOnScreen(); 185 181 … … 193 189 #endif /* Q_WS_WIN */ 194 190 195 /* Show window fullscreen: */191 /* Show in fullscreen mode: */ 196 192 showFullScreen(); 197 193 198 194 /* Make sure the window is placed on valid screen again 199 195 * after window is shown & window's decorations applied. 200 * That is required due to X11 Window Geometry Rules. */196 * That is required (still?) due to X11 Window Geometry Rules. */ 201 197 placeOnScreen(); 202 203 #ifdef Q_WS_MAC204 /* Make sure it is really on the right place (especially on the Mac): */205 QRect r = QApplication::desktop()->screenGeometry(qobject_cast<UIMachineLogicFullscreen*>(machineLogic())->hostScreenForGuestScreen(m_uScreenId));206 move(r.topLeft());207 #endif /* Q_WS_MAC */208 198 209 199 /* Return early: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
r46255 r46256 22 22 #include <QMenu> 23 23 #include <QTimer> 24 #ifdef Q_WS_MAC25 # include <QMenuBar>26 #endif /* Q_WS_MAC */27 24 28 25 /* GUI includes: */ … … 87 84 UIMachineWindow::prepareVisualState(); 88 85 86 /* Make sure we have no background 87 * until the first one paint-event: */ 88 setAttribute(Qt::WA_NoSystemBackground); 89 89 90 #ifdef Q_WS_WIN 90 /* Enable translucent background for Win host, 91 * Mac host has it native, Qt 4.8.3 under x11 host has is broken: */ 91 /* Using Qt API to enable translucent background for the Win host. 92 * - Under Mac host Qt doesn't allows to disable window-shadows 93 * until version 4.8, but minimum supported version is 4.7.1 for now. 94 * - Under x11 host Qt 4.8.3 has it broken wih KDE 4.9 for now: */ 92 95 setAttribute(Qt::WA_TranslucentBackground); 93 96 #endif /* Q_WS_WIN */ 94 97 95 98 #ifdef Q_WS_MAC 96 /* Please note: All the stuff below has to be done after the window has97 * switched to fullscreen. Qt changes the winId on the fullscreen98 * switch and make this stuff useless with the old winId. So please be99 * careful on rearrangement of the method calls.*/99 /* Using native API to enable translucent background for the Mac host. 100 * - We also want to disable window-shadows which is possible 101 * using Qt::WA_MacNoShadow only since Qt 4.8, 102 * while minimum supported version is 4.7.1 for now: */ 100 103 ::darwinSetShowsWindowTransparent(this, true); 101 104 #endif /* Q_WS_MAC */ … … 159 162 { 160 163 #ifndef Q_WS_MAC 161 /* Cle eanup mini-toolbar: */164 /* Cleanup mini-toolbar: */ 162 165 cleanupMiniToolbar(); 163 166 #endif /* !Q_WS_MAC */ … … 207 210 if (pSeamlessLogic->hasHostScreenForGuestScreen(m_uScreenId)) 208 211 { 209 /* Show manually maximized window: */212 /* Make sure the window is maximized and placed on valid screen: */ 210 213 placeOnScreen(); 211 214 212 /* Show normal window: */215 /* Show in normal mode: */ 213 216 show(); 214 215 #ifdef Q_WS_MAC216 /* Make sure it is really on the right place (especially on the Mac): */217 QRect r = vboxGlobal().availableGeometry(qobject_cast<UIMachineLogicSeamless*>(machineLogic())->hostScreenForGuestScreen(m_uScreenId));218 move(r.topLeft());219 #endif /* Q_WS_MAC */220 217 221 218 /* Return early: */ … … 254 251 } 255 252 #endif /* !Q_WS_MAC */ 256 257 #ifdef Q_WS_MAC258 bool UIMachineWindowSeamless::event(QEvent *pEvent)259 {260 switch (pEvent->type())261 {262 case QEvent::Paint:263 {264 /* Clear the background */265 CGContextClearRect(::darwinToCGContextRef(this), ::darwinToCGRect(frameGeometry()));266 break;267 }268 default:269 break;270 }271 return UIMachineWindow::event(pEvent);272 }273 #endif /* Q_WS_MAC */274 253 275 254 #ifdef Q_WS_WIN -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h
r46255 r46256 74 74 #endif /* !Q_WS_MAC */ 75 75 76 #ifdef Q_WS_MAC77 /* Event handlers: */78 bool event(QEvent *pEvent);79 #endif /* Q_WS_MAC */80 81 76 #ifdef Q_WS_WIN 82 77 /* Handler: Translucency stuff: */
Note:
See TracChangeset
for help on using the changeset viewer.