[comctl32] Fix listview item activate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch sends a correct item activate notify message struct.

Changelog:
   * When an item is activated, we should send a NMITEMACTIVATE struct
and not a NMHDR one.


-- 
Maxime Bellengà <maxime.bellenge@laposte.net>
Index: wine/dlls/comctl32/listview.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/listview.c,v
retrieving revision 1.364
diff -u -r1.364 listview.c
--- wine/dlls/comctl32/listview.c	10 Sep 2003 03:56:48 -0000	1.364
+++ wine/dlls/comctl32/listview.c	14 Sep 2003 13:28:46 -0000
@@ -735,9 +735,20 @@
     return notify_hdr(infoPtr, code, &nmh);
 }
 
-static inline void notify_itemactivate(LISTVIEW_INFO *infoPtr)
+static inline void notify_itemactivate(LISTVIEW_INFO *infoPtr, LVHITTESTINFO *htInfo)
 {
-    notify(infoPtr, LVN_ITEMACTIVATE);
+    NMITEMACTIVATE nmia;
+    if (htInfo) {
+      nmia.iItem = htInfo->iItem;
+      nmia.iSubItem = htInfo->iSubItem;
+      nmia.uNewState = 0;
+      nmia.uOldState = 0;
+      nmia.uChanged = 0;
+      nmia.ptAction = htInfo->pt;
+      nmia.lParam = 0;
+      nmia.uKeyFlags = 0;
+    }
+    notify_hdr(infoPtr, LVN_ITEMACTIVATE, (LPNMHDR)&nmia);
 }
 
 static inline LRESULT notify_listview(LISTVIEW_INFO *infoPtr, INT code, LPNMLISTVIEW plvnm)
@@ -7677,7 +7688,7 @@
     notify_click(infoPtr, NM_DBLCLK, &htInfo);
 
     /* To send the LVN_ITEMACTIVATE, it must be on an Item */
-    if(htInfo.iItem != -1) notify(infoPtr, LVN_ITEMACTIVATE);
+    if(htInfo.iItem != -1) notify_itemactivate(infoPtr,&htInfo);
 
     return 0;
 }

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux