提交 c4e2fc79 编写于 作者: D dcherepanov

6770017: PIT : java/awt/Choice/BlockedWin32Choice/BlockedWin32Choice.java...

6770017: PIT : java/awt/Choice/BlockedWin32Choice/BlockedWin32Choice.java fails on 6u12 b01 pit build
Reviewed-by: art
上级 56a9678e
...@@ -86,6 +86,7 @@ static const UINT MINIMUM_NUMBER_OF_VISIBLE_ITEMS = 8; ...@@ -86,6 +86,7 @@ static const UINT MINIMUM_NUMBER_OF_VISIBLE_ITEMS = 8;
AwtChoice::AwtChoice() { AwtChoice::AwtChoice() {
m_hList = NULL; m_hList = NULL;
m_listDefWindowProc = NULL; m_listDefWindowProc = NULL;
m_selectedItem = -1;
} }
LPCTSTR AwtChoice::GetClassName() { LPCTSTR AwtChoice::GetClassName() {
...@@ -437,9 +438,10 @@ LRESULT CALLBACK AwtChoice::ListWindowProc(HWND hwnd, UINT message, ...@@ -437,9 +438,10 @@ LRESULT CALLBACK AwtChoice::ListWindowProc(HWND hwnd, UINT message,
MsgRouting AwtChoice::WmNotify(UINT notifyCode) MsgRouting AwtChoice::WmNotify(UINT notifyCode)
{ {
if (notifyCode == CBN_SELCHANGE) { if (notifyCode == CBN_SELCHANGE) {
int itemSelect = (int)SendMessage(CB_GETCURSEL); int selectedItem = (int)SendMessage(CB_GETCURSEL);
if (itemSelect != CB_ERR){ if (selectedItem != CB_ERR && m_selectedItem != selectedItem){
DoCallback("handleAction", "(I)V", itemSelect); m_selectedItem = selectedItem;
DoCallback("handleAction", "(I)V", selectedItem);
} }
} else if (notifyCode == CBN_DROPDOWN) { } else if (notifyCode == CBN_DROPDOWN) {
......
...@@ -94,6 +94,7 @@ private: ...@@ -94,6 +94,7 @@ private:
static BOOL sm_isMouseMoveInList; static BOOL sm_isMouseMoveInList;
HWND m_hList; HWND m_hList;
WNDPROC m_listDefWindowProc; WNDPROC m_listDefWindowProc;
int m_selectedItem;
static LRESULT CALLBACK ListWindowProc(HWND hwnd, UINT message, static LRESULT CALLBACK ListWindowProc(HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam); WPARAM wParam, LPARAM lParam);
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册