Changeset 1033
- Timestamp:
- Aug 28, 2011, 2:00:00 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/painting/qwindowsurface_pm.cpp
r808 r1033 524 524 525 525 setStaticContentsSupport(true); 526 527 DEBUG(() << "QPMDiveWindowSurface:" << widget); 526 528 } 527 529 … … 658 660 bool QPMDiveWindowSurface::adjustSetup(QWidget *widget) 659 661 { 662 DEBUG(() << "QPMDiveWindowSurface::adjustSetup:" << window() << widget); 663 660 664 HWND hwnd = window()->internalWinId(); 661 665 … … 687 691 wd->vrnDirty = false; 688 692 689 HPS hps = wi ndow()->getPS();693 HPS hps = widget->getPS(); 690 694 HRGN hrgn = GpiCreateRegion(hps, 0L, NULL); 691 695 692 ULONG rc = WinQueryVisibleRegion(hwnd, hrgn); 696 HWND hwndWidget = widget->internalWinId(); 697 ULONG rc = WinQueryVisibleRegion(hwndWidget, hrgn); 693 698 if (rc != RGN_ERROR) { 694 HWND hwndWidget = widget->internalWinId();695 POINTL ptlOffset = { 0, 0 };696 if (hwnd != hwndWidget) {697 // translate the main widget's visible region to this widget's698 // coordinate space699 WinMapWindowPoints(hwnd, hwndWidget, &ptlOffset, 1);700 GpiOffsetRegion(hps, hrgn, &ptlOffset);701 }702 699 // substract children from the visible region, if any 703 700 rc = qt_WinProcessWindowObstacles(hwndWidget, NULL, hrgn, 704 701 CRGN_DIFF, PWO_Children); 705 702 if (rc != RGN_ERROR && hwnd != hwndWidget) { 706 // translate back to the main widget's coordinate space 703 // translate coords to the main widget's coordinate space 704 POINTL ptlOffset = { 0, 0 }; 705 WinMapWindowPoints(hwnd, hwndWidget, &ptlOffset, 1); 707 706 ptlOffset.x = -ptlOffset.x; 708 707 ptlOffset.y = -ptlOffset.y; … … 731 730 732 731 GpiDestroyRegion(hps, hrgn); 733 wi ndow()->releasePS(hps);732 widget->releasePS(hps); 734 733 735 734 // memorize the window height used for the additional visible region
Note:
See TracChangeset
for help on using the changeset viewer.