- Timestamp:
- Jul 10, 2013 11:11:20 AM (12 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
r46864 r47067 354 354 } 355 355 356 void UIFrameBuffer::applyVisibleRegion(const QRegion ®ion) 357 { 358 /* Make sure async visible-region has changed: */ 359 if (m_asyncVisibleRegion == region) 360 return; 361 362 /* We are accounting async visible-regions one-by-one 363 * to keep corresponding viewport area always updated! */ 364 if (!m_asyncVisibleRegion.isEmpty()) 365 m_pMachineView->viewport()->update(m_asyncVisibleRegion - region); 366 367 /* Remember last visible region: */ 368 m_asyncVisibleRegion = region; 369 370 #ifdef Q_WS_X11 371 /* Qt 4.8.3 under X11 has Qt::WA_TranslucentBackground window attribute broken, 372 * so we are also have to use async visible-region to apply to [Q]Widget [set]Mask 373 * which internally wraps old one known (approved) Xshape extension: */ 374 m_pMachineView->machineWindow()->setMask(m_asyncVisibleRegion); 375 #endif /* Q_WS_X11 */ 376 } 377 356 378 #ifdef VBOX_WITH_VIDEOHWACCEL 357 379 void UIFrameBuffer::doProcessVHWACommand(QEvent *pEvent) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h
r46364 r47067 190 190 virtual void resizeEvent(UIResizeEvent *pEvent) = 0; 191 191 virtual void paintEvent(QPaintEvent *pEvent) = 0; 192 virtual void applyVisibleRegion(const QRegion ®ion) = 0;192 virtual void applyVisibleRegion(const QRegion ®ion); 193 193 194 194 #ifdef VBOX_WITH_VIDEOHWACCEL -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBufferQImage.cpp
r47058 r47067 178 178 } 179 179 180 void UIFrameBufferQImage::applyVisibleRegion(const QRegion ®ion)181 {182 /* Make sure async visible-region changed: */183 if (m_asyncVisibleRegion == region)184 return;185 186 /* We are accounting async visible-regions one-by-one187 * to keep corresponding viewport area always updated! */188 m_pMachineView->viewport()->update(region + m_asyncVisibleRegion);189 m_asyncVisibleRegion = region;190 191 #ifdef Q_WS_X11192 /* Qt 4.8.3 under X11 has Qt::WA_TranslucentBackground window attribute broken,193 * so we are also have to use async visible-region to apply to [Q]Widget [set]Mask194 * which internally wraps old one known (approved) Xshape extension: */195 m_pMachineView->machineWindow()->setMask(m_asyncVisibleRegion);196 #endif /* Q_WS_X11 */197 }198 199 180 void UIFrameBufferQImage::paintDefault(QPaintEvent *pEvent) 200 181 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBufferQImage.h
r46364 r47067 47 47 void resizeEvent(UIResizeEvent *pEvent); 48 48 void paintEvent(QPaintEvent *pEvent); 49 void applyVisibleRegion(const QRegion ®ion);50 49 51 50 private: -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBufferQuartz2D.cpp
r46366 r47067 468 468 } 469 469 470 void UIFrameBufferQuartz2D::applyVisibleRegion(const QRegion ®ion)471 {472 /* Make sure async visible-region changed: */473 if (m_asyncVisibleRegion == region)474 return;475 476 /* We are handling the fact of async visible-region change477 * to invalidate whole the viewport area! */478 ::darwinWindowInvalidateShape(m_pMachineView->viewport());479 m_asyncVisibleRegion = region;480 }481 482 470 void UIFrameBufferQuartz2D::clean(bool fPreserveRegions) 483 471 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBufferQuartz2D.h
r46364 r47067 50 50 void resizeEvent(UIResizeEvent *pEvent); 51 51 void paintEvent(QPaintEvent *pEvent); 52 void applyVisibleRegion(const QRegion ®ion);53 52 54 53 #ifdef VBOX_WITH_VIDEOHWACCEL
Note:
See TracChangeset
for help on using the changeset viewer.