diff -u -N -r source-old/dll/win32/comdlg32/colordlg.c source/dll/win32/comdlg32/colordlg.c --- source-old/dll/win32/comdlg32/colordlg.c Sun Apr 18 13:00:57 2010 +++ source/dll/win32/comdlg32/colordlg.c Tue May 4 11:18:12 2010 @@ -1112,6 +1112,7 @@ lpp->capturedGraph = 0; ReleaseCapture(); CC_PaintCross(hDlg, lpp->h, lpp->s); + ClipCursor(NULL); return 1; } return 0; @@ -1148,6 +1149,7 @@ else { ReleaseCapture(); + ClipCursor(NULL); lpp->capturedGraph = 0; } return 1; @@ -1162,6 +1164,8 @@ { LPCCPRIV lpp = GetPropW( hDlg, szColourDialogProp ); int r, g, b, i; + HWND hwnd; + RECT rc; i = 0; if (CC_MouseCheckPredefColorArray(lpp, hDlg, 0x2d0, 6, 8, lParam)) @@ -1188,6 +1192,10 @@ g = CC_HSLtoRGB('G', lpp->h, lpp->s, lpp->l); b = CC_HSLtoRGB('B', lpp->h, lpp->s, lpp->l); lpp->lpcc->rgbResult = RGB(r, g, b); + hwnd = GetDlgItem(hDlg, lpp->capturedGraph); + GetClientRect(hwnd, &rc); + MapWindowPoints(hwnd, NULL, (POINT *) &rc, 2); + ClipCursor(&rc); } if ( i == 1 ) { @@ -1263,11 +1271,11 @@ if (CC_WMMouseMove(hDlg, lParam)) return TRUE; break; - case WM_LBUTTONUP: /* FIXME: ClipCursor off (if in color graph)*/ + case WM_LBUTTONUP: if (CC_WMLButtonUp(hDlg)) return TRUE; break; - case WM_LBUTTONDOWN:/* FIXME: ClipCursor on (if in color graph)*/ + case WM_LBUTTONDOWN: if (CC_WMLButtonDown(hDlg, lParam)) return TRUE; break;