Lei Zhang : user32: Add edit control check to see if its in a dialog on WM_CHAR/VK_TAB.

Alexandre Julliard julliard at winehq.org
Wed Apr 9 14:31:34 CDT 2008


Module: wine
Branch: master
Commit: b7ffa867256f7fdf886c23a93048399bd16794ed
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b7ffa867256f7fdf886c23a93048399bd16794ed

Author: Lei Zhang <thestig at google.com>
Date:   Wed Apr  9 11:33:32 2008 -0700

user32: Add edit control check to see if its in a dialog on WM_CHAR/VK_TAB.

---

 dlls/user32/edit.c       |    7 ++-----
 dlls/user32/tests/edit.c |    6 ++----
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c
index a074c17..7fd62cc 100644
--- a/dlls/user32/edit.c
+++ b/dlls/user32/edit.c
@@ -861,11 +861,6 @@ static LRESULT WINAPI EditWndProc_common( HWND hwnd, UINT msg,
                         }
                     }
                 }
-                else
-                {
-                  if (charW == VK_TAB)
-                      break;
-                }
 		result = EDIT_WM_Char(es, charW);
 		break;
 	}
@@ -4050,6 +4045,8 @@ static LRESULT EDIT_WM_Char(EDITSTATE *es, WCHAR c)
 		if ((es->style & ES_MULTILINE) && !(es->style & ES_READONLY))
 		{
 			static const WCHAR tabW[] = {'\t',0};
+                        if (EDIT_IsInsideDialog(es))
+                            break;
 			EDIT_EM_ReplaceSel(es, TRUE, tabW, TRUE, TRUE);
 		}
 		break;
diff --git a/dlls/user32/tests/edit.c b/dlls/user32/tests/edit.c
index 82c4ee0..e5a69ac 100644
--- a/dlls/user32/tests/edit.c
+++ b/dlls/user32/tests/edit.c
@@ -1719,15 +1719,13 @@ static void test_tab(void)
     ok(TRUE == r, "Expected: %d, got: %d\n", TRUE, r);
 
     r = SendMessage(hwEdit, WM_CHAR, VK_TAB, 0);
-    todo_wine ok(1 == r, "Expected: %d, got: %d\n", 1, r);
+    ok(1 == r, "Expected: %d, got: %d\n", 1, r);
 
     /* get text */
     buffer[0] = 0;
     r = SendMessage(hwEdit, WM_GETTEXT, 16, (LPARAM) buffer);
-    todo_wine {
     ok(1 == r, "Expected: %d, got len %d\n", 1, r);
     ok(0 == strcmp(buffer, "\t"), "expected \"\\t\", got \"%s\"\n", buffer);
-    }
 
     DestroyWindow (hwEdit);
 
@@ -1741,7 +1739,7 @@ static void test_tab(void)
     ok(TRUE == r, "Expected: %d, got: %d\n", TRUE, r);
 
     r = SendMessage(hwEdit, WM_CHAR, VK_TAB, 0);
-    todo_wine ok(1 == r, "Expected: %d, got: %d\n", 1, r);
+    ok(1 == r, "Expected: %d, got: %d\n", 1, r);
 
     /* get text */
     buffer[0] = 0;




More information about the wine-cvs mailing list