- Timestamp:
- May 22, 2008 9:39:26 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r9043 r9050 1942 1942 bool VBoxConsoleWnd::toggleFullscreenMode (bool aOn, bool aSeamless) 1943 1943 { 1944 /* Please note: For some platforms like the Mac, the calling order of the 1945 * functions in this methods is vital. So please be carefull on changing 1946 * this. */ 1947 1944 1948 QSize initialSize = size(); 1945 1949 if (aSeamless || console->isAutoresizeGuestActive()) … … 2116 2120 console->setVScrollBarMode (QScrollView::AlwaysOff); 2117 2121 console->setHScrollBarMode (QScrollView::AlwaysOff); 2118 2119 #ifdef Q_WS_MAC /* setMask seems to not include the far border pixels. */2120 // QRect maskRect = dtw->screenGeometry (this);2121 // maskRect.setRight (maskRect.right() + 1);2122 // maskRect.setBottom (maskRect.bottom() + 1);2123 // setMask (maskRect);2124 if (aSeamless)2125 {2126 OSStatus status;2127 WindowPtr WindowRef = reinterpret_cast<WindowPtr>(winId());2128 EventTypeSpec wNonCompositingEvent = { kEventClassWindow, kEventWindowGetRegion };2129 status = InstallWindowEventHandler (WindowRef, DarwinRegionHandler, GetEventTypeCount (wNonCompositingEvent), &wNonCompositingEvent, &mCurrRegion, &mDarwinRegionEventHandlerRef);2130 Assert (status == noErr);2131 status = ReshapeCustomWindow (WindowRef);2132 Assert (status == noErr);2133 UInt32 features;2134 status = GetWindowFeatures (WindowRef, &features);2135 Assert (status == noErr);2136 if (( features & kWindowIsOpaque ) != 0)2137 {2138 status = HIWindowChangeFeatures (WindowRef, 0, kWindowIsOpaque);2139 Assert(status == noErr);2140 }2141 status = SetWindowAlpha(WindowRef, 0.999);2142 Assert (status == noErr);2143 /* For now disable the shadow of the window. This feature cause errors2144 * if a window in vbox looses focus, is reselected and than moved. */2145 /** @todo Search for an option to enable this again. A shadow on every2146 * window has a big coolness factor. */2147 ChangeWindowAttributes (WindowRef, kWindowNoShadowAttribute, 0);2148 }2149 #else2150 // setMask (dtw->screenGeometry (this));2151 #endif2152 2122 } 2153 2123 else … … 2170 2140 if (aSeamless) 2171 2141 { 2142 /* Please note: All the stuff below has to be done before the 2143 * window switch back to normal size. Qt changes the winId on the 2144 * fullscreen switch and make this stuff useless with the old 2145 * winId. So please be carefull on rearrangement of the method 2146 * calls. */ 2172 2147 /* Undo all mac specific installations */ 2173 2148 OSStatus status; … … 2204 2179 /* Toggle qt full-screen mode */ 2205 2180 setWindowState (windowState() ^ WindowFullScreen); 2181 2182 #ifdef Q_WS_MAC 2183 if (aOn && aSeamless) 2184 { 2185 /* Please note: All the stuff below has to be done after the window has 2186 * switched to fullscreen. Qt changes the winId on the fullscreen 2187 * switch and make this stuff useless with the old winId. So please be 2188 * carefull on rearrangement of the method calls. */ 2189 OSStatus status; 2190 WindowPtr WindowRef = reinterpret_cast<WindowPtr>(winId()); 2191 EventTypeSpec wNonCompositingEvent = { kEventClassWindow, kEventWindowGetRegion }; 2192 status = InstallWindowEventHandler (WindowRef, DarwinRegionHandler, GetEventTypeCount (wNonCompositingEvent), &wNonCompositingEvent, &mCurrRegion, &mDarwinRegionEventHandlerRef); 2193 Assert (status == noErr); 2194 status = ReshapeCustomWindow (WindowRef); 2195 Assert (status == noErr); 2196 UInt32 features; 2197 status = GetWindowFeatures (WindowRef, &features); 2198 Assert (status == noErr); 2199 if (( features & kWindowIsOpaque ) != 0) 2200 { 2201 status = HIWindowChangeFeatures (WindowRef, 0, kWindowIsOpaque); 2202 Assert(status == noErr); 2203 } 2204 status = SetWindowAlpha(WindowRef, 0.999); 2205 Assert (status == noErr); 2206 /* For now disable the shadow of the window. This feature cause errors 2207 * if a window in vbox looses focus, is reselected and than moved. */ 2208 /** @todo Search for an option to enable this again. A shadow on every 2209 * window has a big coolness factor. */ 2210 ChangeWindowAttributes (WindowRef, kWindowNoShadowAttribute, 0); 2211 } 2212 #endif 2206 2213 2207 2214 /* Process all console attributes changes and sub-widget hidings */
Note:
See TracChangeset
for help on using the changeset viewer.