Changeset 714 for trunk/src/gui/painting/qwindowsurface_pm.cpp
- Timestamp:
- Apr 28, 2010, 8:41:11 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/painting/qwindowsurface_pm.cpp
r713 r714 254 254 static HDIVE diveHandle = NULLHANDLE; 255 255 static char *diveFrameBuf = NULL; 256 static bool diveHideMouse = false; 257 258 static LONG mousePtrSize = 0; 256 259 257 260 //////////////////////////////////////////////////////////////////////////////// … … 663 666 // use direct framebuffer access 664 667 diveUseFB = true; 668 } else if (diveEnv == "FBSWM") { 669 // use direct framebuffer access, hide the mouse pointer 670 diveUseFB = true; 671 diveHideMouse = true; 665 672 } else { 666 673 // disable DIVE by default due to bugs in the Panorama driver … … 776 783 } 777 784 } 785 786 mousePtrSize = WinQuerySysValue(HWND_DESKTOP, SV_CXPOINTER); 778 787 } 779 788 } … … 781 790 DEBUG_VAR(diveDllOK); 782 791 DEBUG_VAR(diveUseFB); 792 DEBUG_VAR(diveHideMouse); 783 793 } 784 794 … … 884 894 885 895 const int srcBytesPerLine = d->image->bytesPerLine(); 896 897 bool ptrHidden = false; 898 if (diveHideMouse) { 899 // DIVE is not able to preserve the software mouse pointer when 900 // painting over it using the direct framebuffer access. We have to 901 // hide it to avoid screen corruption underneath 902 POINTL ptrPos; 903 if (WinQueryPointerPos(HWND_DESKTOP, &ptrPos)) { 904 ptrPos.x -= d->setup.lScreenPosX; 905 ptrPos.y = diveCaps.ulVerticalResolution - ptrPos.y - 1 - 906 d->setup.lScreenPosY; 907 // keep a safety zone around the rectangle to each direction 908 // as we don't know the exact mouse pointer configuration 909 if (ptrPos.x >= (src.left() - mousePtrSize) && 910 ptrPos.x <= (src.right() + mousePtrSize) && 911 ptrPos.y >= (src.top() - mousePtrSize) && 912 ptrPos.y <= (src.bottom() + mousePtrSize)) 913 ptrHidden = WinShowPointer(HWND_DESKTOP, FALSE); 914 } 915 } 886 916 887 917 if (DiveAcquireFrameBuffer(d->hDive, &rclDst) == DIVE_SUCCESS) { … … 1031 1061 DiveDeacquireFrameBuffer(d->hDive); 1032 1062 } 1063 1064 if (ptrHidden) 1065 WinShowPointer(HWND_DESKTOP, TRUE); 1033 1066 } 1034 1067
Note:
See TracChangeset
for help on using the changeset viewer.