[pkg-wine-party] [SCM] Debian Wine packaging branch, wheezy, updated. wine-1.4-7-302-gb61b690
Alexandre Julliard
julliard at winehq.org
Sun Jun 17 20:04:07 UTC 2012
The following commit has been merged in the wheezy branch:
commit 633337069a5510e1794a5d9248ba57e48254b9a8
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Tue May 22 11:31:23 2012 +0400
comctl32: Make it possible to use TVM_GETITEM with item from another tree.
(cherry picked from commit 95a15a3482ba47c1b84fd77a63f95d5cd784a97a)
diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c
index 3f4fdc6..63e3507 100644
--- a/dlls/comctl32/treeview.c
+++ b/dlls/comctl32/treeview.c
@@ -67,36 +67,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(treeview);
/* internal structures */
-typedef struct _TREEITEM /* HTREEITEM is a _TREEINFO *. */
-{
- HTREEITEM parent; /* handle to parent or 0 if at root */
- HTREEITEM nextSibling; /* handle to next item in list, 0 if last */
- HTREEITEM firstChild; /* handle to first child or 0 if no child */
-
- UINT callbackMask;
- UINT state;
- UINT stateMask;
- LPWSTR pszText;
- int cchTextMax;
- int iImage;
- int iSelectedImage;
- int iExpandedImage;
- int cChildren;
- LPARAM lParam;
- int iIntegral; /* item height multiplier (1 is normal) */
- int iLevel; /* indentation level:0=root level */
- HTREEITEM lastChild;
- HTREEITEM prevSibling; /* handle to prev item in list, 0 if first */
- RECT rect;
- LONG linesOffset;
- LONG stateOffset;
- LONG imageOffset;
- LONG textOffset;
- LONG textWidth; /* horizontal text extent for pszText */
- LONG visibleOrder; /* visible ordering, 0 is first visible item */
-} TREEVIEW_ITEM;
-
-
typedef struct tagTREEVIEW_INFO
{
HWND hwnd;
@@ -163,6 +133,35 @@ typedef struct tagTREEVIEW_INFO
WCHAR szSearchParam[ MAX_PATH ];
} TREEVIEW_INFO;
+typedef struct _TREEITEM /* HTREEITEM is a _TREEINFO *. */
+{
+ HTREEITEM parent; /* handle to parent or 0 if at root */
+ HTREEITEM nextSibling; /* handle to next item in list, 0 if last */
+ HTREEITEM firstChild; /* handle to first child or 0 if no child */
+
+ UINT callbackMask;
+ UINT state;
+ UINT stateMask;
+ LPWSTR pszText;
+ int cchTextMax;
+ int iImage;
+ int iSelectedImage;
+ int iExpandedImage;
+ int cChildren;
+ LPARAM lParam;
+ int iIntegral; /* item height multiplier (1 is normal) */
+ int iLevel; /* indentation level:0=root level */
+ HTREEITEM lastChild;
+ HTREEITEM prevSibling; /* handle to prev item in list, 0 if first */
+ RECT rect;
+ LONG linesOffset;
+ LONG stateOffset;
+ LONG imageOffset;
+ LONG textOffset;
+ LONG textWidth; /* horizontal text extent for pszText */
+ LONG visibleOrder; /* visible ordering, 0 is first visible item */
+ const TREEVIEW_INFO *infoPtr; /* tree data this item belongs to */
+} TREEVIEW_ITEM;
/******** Defines that TREEVIEW_ProcessLetterKeys uses ****************/
#define KEY_DELAY 450
@@ -1012,6 +1011,7 @@ TREEVIEW_AllocateItem(const TREEVIEW_INFO *infoPtr)
newItem->iImage = 0;
newItem->iSelectedImage = 0;
newItem->iExpandedImage = (WORD)I_IMAGENONE;
+ newItem->infoPtr = infoPtr;
if (DPA_InsertPtr(infoPtr->items, INT_MAX, newItem) == -1)
{
@@ -2082,7 +2082,13 @@ TREEVIEW_GetItemT(const TREEVIEW_INFO *infoPtr, LPTVITEMEXW tvItem, BOOL isW)
TREEVIEW_ITEM *item = tvItem->hItem;
if (!TREEVIEW_ValidItem(infoPtr, item))
- return FALSE;
+ {
+ if (!item) return FALSE;
+
+ TRACE("got item from different tree %p, called from %p\n", item->infoPtr, infoPtr);
+ infoPtr = item->infoPtr;
+ if (!TREEVIEW_ValidItem(infoPtr, item)) return FALSE;
+ }
TREEVIEW_UpdateDispInfo(infoPtr, item, tvItem->mask);
--
Debian Wine packaging
More information about the pkg-wine-party
mailing list