Module: wine Branch: master Commit: a7fb6c89b3535368faaad06b1bd49253ed3c1430 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a7fb6c89b3535368faaad06b1b...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Wed Jun 4 00:46:31 2014 +0400
comctl32/treeview: Send TVN_KEYDOWN in response of WM_KEYDOWN.
---
dlls/comctl32/tests/treeview.c | 4 ++-- dlls/comctl32/treeview.c | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c index 3b70e6c..24a63d8 100644 --- a/dlls/comctl32/tests/treeview.c +++ b/dlls/comctl32/tests/treeview.c @@ -206,7 +206,7 @@ static const struct message parent_expand_seq[] = { };
static const struct message parent_expand_kb_seq[] = { - { WM_NOTIFY, sent|id|optional, 0, 0, TVN_KEYDOWN }, + { WM_NOTIFY, sent|id, 0, 0, TVN_KEYDOWN }, { WM_NOTIFY, sent|id, 0, 0, TVN_ITEMEXPANDINGA }, { WM_NOTIFY, sent|id, 0, 0, TVN_ITEMEXPANDEDA }, { WM_CHANGEUISTATE, sent|optional }, @@ -221,7 +221,7 @@ static const struct message parent_collapse_2nd_kb_seq[] = { };
static const struct message parent_expand_empty_kb_seq[] = { - { WM_NOTIFY, sent|id|optional, 0, 0, TVN_KEYDOWN }, + { WM_NOTIFY, sent|id, 0, 0, TVN_KEYDOWN }, { WM_CHANGEUISTATE, sent|optional }, { 0 } }; diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index c26513f..4067323 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -5201,11 +5201,15 @@ TREEVIEW_KeyDown(TREEVIEW_INFO *infoPtr, WPARAM wParam) { /* If it is non-NULL and different, it will be selected and visible. */ TREEVIEW_ITEM *newSelection = NULL; - TREEVIEW_ITEM *prevItem = infoPtr->selectedItem; + NMTVKEYDOWN nmkeydown;
TRACE("%lx\n", wParam);
+ nmkeydown.wVKey = wParam; + nmkeydown.flags = 0; + TREEVIEW_SendRealNotify(infoPtr, TVN_KEYDOWN, &nmkeydown.hdr); + if (prevItem == NULL) return FALSE;