Changeset 8382 for trunk/src/comctl32/imagelist.c
- Timestamp:
- May 8, 2002, 1:26:30 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/imagelist.c
r7815 r8382 6 6 * 2001 Michael Stefaniuc 7 7 * 2001 Charles Loep for CodeWeavers 8 * 9 * This library is free software; you can redistribute it and/or 10 * modify it under the terms of the GNU Lesser General Public 11 * License as published by the Free Software Foundation; either 12 * version 2.1 of the License, or (at your option) any later version. 13 * 14 * This library is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 * Lesser General Public License for more details. 18 * 19 * You should have received a copy of the GNU Lesser General Public 20 * License along with this library; if not, write to the Free Software 21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 8 22 * 9 23 * TODO: … … 22 36 * partially implemented, the functions mentioned above will be 23 37 * limited in functionality too. 38 * 39 * - Hotspot handling still not correct. The Hotspot passed to BeginDrag 40 * is the offset of the image position relative to the actual mouse pointer 41 * position. However the Hotspot passed to SetDragCursorImage is the 42 * offset of the mouse messages sent to the application... 24 43 */ 25 44 … … 32 51 #include "commctrl.h" 33 52 #include "imagelist.h" 34 #include " debugtools.h"35 36 DEFAULT_DEBUG_CHANNEL(imagelist);53 #include "wine/debug.h" 54 55 WINE_DEFAULT_DEBUG_CHANNEL(imagelist); 37 56 38 57 … … 54 73 /* saved background */ 55 74 HBITMAP hbmBg; 75 BOOL bHSPending; 56 76 } INTERNALDRAG; 57 77 58 static INTERNALDRAG InternalDrag = { 0, 0, 0, 0, 0, 0, FALSE, 0 };78 static INTERNALDRAG InternalDrag = { 0, 0, 0, 0, 0, 0, FALSE, 0, FALSE }; 59 79 60 80 … … 748 768 749 769 InternalDrag.himl->cCurImage = 1; 770 InternalDrag.bHSPending = TRUE; 750 771 751 772 return TRUE; … … 1072 1093 ImageList_DragLeave (HWND hwndLock) 1073 1094 { 1074 if (hwndLock) 1095 /* As we don't save drag info in the window this can lead to problems if 1096 an app does not supply the same window as DragEnter */ 1097 /* if (hwndLock) 1075 1098 InternalDrag.hwnd = hwndLock; 1076 1099 else 1077 InternalDrag.hwnd = GetDesktopWindow (); 1100 InternalDrag.hwnd = GetDesktopWindow (); */ 1101 if(!hwndLock) 1102 hwndLock = GetDesktopWindow(); 1103 if(InternalDrag.hwnd != hwndLock) 1104 FIXME("DragLeave hWnd != DragEnter hWnd\n"); 1078 1105 1079 1106 ImageList_DragShowNolock (FALSE); … … 1490 1517 DeleteObject(InternalDrag.hbmBg); 1491 1518 InternalDrag.hbmBg = 0; 1519 InternalDrag.bHSPending = FALSE; 1492 1520 1493 1521 return TRUE; … … 2601 2629 * hotspot) to the origin of the second image. 2602 2630 * See M$DN for details */ 2603 dx = InternalDrag.dxHotspot - dxHotspot; 2604 dy = InternalDrag.dyHotspot - dyHotspot; 2631 if(InternalDrag.bHSPending) { 2632 dx = 0; 2633 dy = 0; 2634 InternalDrag.bHSPending = FALSE; 2635 } else { 2636 dx = InternalDrag.dxHotspot - dxHotspot; 2637 dy = InternalDrag.dyHotspot - dyHotspot; 2638 } 2605 2639 himlTemp = ImageList_Merge (InternalDrag.himl, 0, himlDrag, iDrag, dx, dy); 2606 2640 … … 2621 2655 /* update the InternalDragOffset, if the origin of the 2622 2656 * DragImage was changed by ImageList_Merge. */ 2623 if (dx > InternalDrag.dxHotspot) { 2624 InternalDrag.dxHotspot = dx; 2625 } 2626 if (dy > InternalDrag.dyHotspot) { 2627 InternalDrag.dyHotspot = dy; 2628 } 2657 if (dx <= 0) 2658 InternalDrag.dxHotspot = dxHotspot; 2659 if (dy <= 0) 2660 InternalDrag.dyHotspot = dyHotspot; 2629 2661 2630 2662 if (visible) { … … 2934 2966 2935 2967 if(bitCount == 1) { 2936 //Hack. 2968 /* Hack. */ 2937 2969 LPBITMAPINFO inf = (LPBITMAPINFO)bmih; 2938 2970 inf->bmiColors[0].rgbRed = inf->bmiColors[0].rgbGreen = inf->bmiColors[0].rgbBlue = 0;
Note:
See TracChangeset
for help on using the changeset viewer.