儲存庫 vbox 的更動 12096
- 時間撮記:
- 2008-9-4 下午02:28:36 (16 年 以前)
- 位置:
- trunk/src/VBox/Frontends/VirtualBox4
- 檔案:
-
- 修改 3 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleView.h
r11971 r12096 81 81 82 82 bool pause (bool on); 83 bool isPaused() { return mLastState == KMachineState_Paused; } 84 const QPixmap& pauseShot() const { return mPausedShot; } 83 85 84 86 void setMouseIntegrationEnabled (bool enabled); … … 203 205 void setPointerShape (MousePointerChangeEvent *me); 204 206 205 bool isPaused() { return mLastState == KMachineState_Paused; }206 207 bool isRunning() { return mLastState == KMachineState_Running; } 207 208 -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleView.cpp
r12018 r12096 3023 3023 } 3024 3024 3025 /* we have a snapshot for the paused state */ 3026 QRect r = pe->rect().intersect (viewport()->rect()); 3027 /* We have to disable paint on screen if we are using the regular painter */ 3028 bool paintOnScreen = viewport()->testAttribute (Qt::WA_PaintOnScreen); 3029 viewport()->setAttribute (Qt::WA_PaintOnScreen, false); 3030 QPainter pnt (viewport()); 3031 pnt.drawPixmap (r.x(), r.y(), mPausedShot, 3032 r.x() + contentsX(), r.y() + contentsY(), 3033 r.width(), r.height()); 3034 /* Restore the attribute to its previous state */ 3035 viewport()->setAttribute (Qt::WA_PaintOnScreen, paintOnScreen); 3036 3025 #ifdef VBOX_GUI_USE_QUARTZ2D 3026 if (mode == VBoxDefs::Quartz2DMode) 3027 mFrameBuf->paintEvent (pe); 3028 else 3029 #endif 3030 { 3031 /* we have a snapshot for the paused state */ 3032 QRect r = pe->rect().intersect (viewport()->rect()); 3033 /* We have to disable paint on screen if we are using the regular painter */ 3034 bool paintOnScreen = viewport()->testAttribute (Qt::WA_PaintOnScreen); 3035 viewport()->setAttribute (Qt::WA_PaintOnScreen, false); 3036 QPainter pnt (viewport()); 3037 pnt.drawPixmap (r.x(), r.y(), mPausedShot, 3038 r.x() + contentsX(), r.y() + contentsY(), 3039 r.width(), r.height()); 3040 /* Restore the attribute to its previous state */ 3041 viewport()->setAttribute (Qt::WA_PaintOnScreen, paintOnScreen); 3037 3042 #ifdef Q_WS_MAC 3038 ::darwinUpdateDockPreview (::darwinToCGImageRef (&mPausedShot), 3039 mVirtualBoxLogo, 3040 mMainWnd->dockImageState()); 3041 #endif 3043 ::darwinUpdateDockPreview (::darwinToCGImageRef (&mPausedShot), 3044 mVirtualBoxLogo, 3045 mMainWnd->dockImageState()); 3046 #endif 3047 } 3048 3042 3049 } 3043 3050 -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxFBQuartz2D.cpp
r8915 r12096 157 157 Assert (mImage); 158 158 159 QWidget *main = vboxGlobal().mainWindow();159 VBoxConsoleWnd *main = qobject_cast <VBoxConsoleWnd *> (vboxGlobal().mainWindow()); 160 160 Assert (VALID_PTR (main)); 161 161 QWidget* viewport = mView->viewport(); … … 171 171 Assert (VALID_PTR (ctx)); 172 172 /* We handle the seamless mode as a special case. */ 173 if ( qobject_cast <VBoxConsoleWnd *> (main)->isTrueSeamless())173 if (main->isTrueSeamless()) 174 174 { 175 175 /* Here we paint the windows without any wallpaper. … … 178 178 /* Create a subimage of the current view. 179 179 * Currently this subimage is the whole screen. */ 180 CGImageRef subImage = CGImageCreateWithImageInRect (mImage, CGRectMake (mView->contentsX(), mView->contentsY(), mView->visibleWidth(), mView->visibleHeight())); 180 CGImageRef subImage; 181 if (mView->isPaused()) 182 subImage = CGImageCreateWithImageInRect (::darwinToCGImageRef (&mView->pauseShot()), CGRectMake (mView->contentsX(), mView->contentsY(), mView->visibleWidth(), mView->visibleHeight())); 183 else 184 subImage = CGImageCreateWithImageInRect (mImage, CGRectMake (mView->contentsX(), mView->contentsY(), mView->visibleWidth(), mView->visibleHeight())); 181 185 Assert (VALID_PTR (subImage)); 182 186 /* Clear the background (Make the rect fully transparent) */ … … 221 225 QRect ir = aEvent->rect(); 222 226 QRect is = QRect (ir.x() + mView->contentsX(), ir.y() + mView->contentsY(), ir.width(), ir.height()); 223 CGImageRef subImage = CGImageCreateWithImageInRect (mImage, ::darwinToHIRect (is)); 227 CGImageRef subImage; 228 if (mView->isPaused()) 229 subImage = CGImageCreateWithImageInRect (::darwinToCGImageRef (&mView->pauseShot()), ::darwinToHIRect (is)); 230 else 231 subImage = CGImageCreateWithImageInRect (mImage, ::darwinToHIRect (is)); 224 232 Assert (VALID_PTR (subImage)); 225 233 /* Ok, for more performance we set a clipping path of the
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器