Add patch to fix issues with dragimage in ImageLists.

This commit is contained in:
Sebastian Lackner
2014-08-18 00:56:24 +02:00
parent 6f776b5d61
commit e93cad00c3
4 changed files with 67 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ PATCHLIST := \
Pipelight.ok \
atl-IOCS_Property.ok \
bcrypt-BCryptGetFipsAlgorithmMode.ok \
comctl32-ImageList.ok \
comctl32-LoadIconMetric.ok \
dsound-Fast_Mixer.ok \
dwmapi-Invalidate_Thumbnail.ok \
@@ -156,6 +157,24 @@ bcrypt-BCryptGetFipsAlgorithmMode.ok:
echo '+ { "bcrypt-BCryptGetFipsAlgorithmMode", "Michael Müller", "Add semi-stub for BCryptGetFipsAlgorithmMode." },'; \
) > bcrypt-BCryptGetFipsAlgorithmMode.ok
# Patchset comctl32-ImageList
# |
# | Included patches:
# | * Fix issue that dragimage in ImageList only works for first four elements. [by Sebastian Lackner]
# |
# | This patchset fixes the following Wine bugs:
# | * [#36761] Fix issue with invisible dragimages in ImageList
# |
# | Modified files:
# | * dlls/comctl32/imagelist.c
# |
.INTERMEDIATE: comctl32-ImageList.ok
comctl32-ImageList.ok:
$(call APPLY_FILE,comctl32-ImageList/0001-comctl32-Fix-issue-that-dragimage-in-ImageList-only-.patch)
@( \
echo '+ { "comctl32-ImageList", "Sebastian Lackner", "Fix issue that dragimage in ImageList only works for first four elements." },'; \
) > comctl32-ImageList.ok
# Patchset comctl32-LoadIconMetric
# |
# | Included patches:

View File

@@ -0,0 +1,42 @@
From a79d771501ec85da65e27234972807364e1b29db Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 18 Aug 2014 00:50:41 +0200
Subject: comctl32: Fix issue that dragimage in ImageList only works for first
four elements.
Patch by ocean04 [at] suomi24 [dot] fi, provided at Wine bug #36761.
---
dlls/comctl32/imagelist.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c
index 645068d..f15a0a9 100644
--- a/dlls/comctl32/imagelist.c
+++ b/dlls/comctl32/imagelist.c
@@ -599,6 +599,7 @@ ImageList_BeginDrag (HIMAGELIST himlTrack, INT iTrack,
INT dxHotspot, INT dyHotspot)
{
INT cx, cy;
+ POINT ptSrc;
TRACE("(himlTrack=%p iTrack=%d dx=%d dy=%d)\n", himlTrack, iTrack,
dxHotspot, dyHotspot);
@@ -620,12 +621,13 @@ ImageList_BeginDrag (HIMAGELIST himlTrack, INT iTrack,
InternalDrag.dxHotspot = dxHotspot;
InternalDrag.dyHotspot = dyHotspot;
+ imagelist_point_from_index( himlTrack, iTrack, &ptSrc );
/* copy image */
- BitBlt (InternalDrag.himl->hdcImage, 0, 0, cx, cy, himlTrack->hdcImage, iTrack * cx, 0, SRCCOPY);
+ BitBlt (InternalDrag.himl->hdcImage, 0, 0, cx, cy, himlTrack->hdcImage, ptSrc.x, ptSrc.y, SRCCOPY);
/* copy mask */
- BitBlt (InternalDrag.himl->hdcMask, 0, 0, cx, cy, himlTrack->hdcMask, iTrack * cx, 0, SRCCOPY);
+ BitBlt (InternalDrag.himl->hdcMask, 0, 0, cx, cy, himlTrack->hdcMask, ptSrc.x, ptSrc.y, SRCCOPY);
InternalDrag.himl->cCurImage = 1;
--
1.7.9.5

View File

@@ -0,0 +1,4 @@
Author: Sebastian Lackner
Subject: Fix issue that dragimage in ImageList only works for first four elements.
Revision: 1
Fixes: [36761] Fix issue with invisible dragimages in ImageList