Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
2f0b1112
Commit
2f0b1112
authored
Apr 23, 2008
by
Lei Zhang
Committed by
Alexandre Julliard
Apr 24, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Handle VK_RETURN WM_KEYDOWN events better in edit controls.
Elias Benali wrote the initial version of this patch.
parent
1e5faee2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
edit.c
dlls/user32/edit.c
+6
-2
edit.c
dlls/user32/tests/edit.c
+2
-2
No files found.
dlls/user32/edit.c
View file @
2f0b1112
...
...
@@ -4602,8 +4602,12 @@ static LRESULT EDIT_WM_KeyDown(EDITSTATE *es, INT key)
/* If the edit doesn't want the return send a message to the default object */
if
(
!
(
es
->
style
&
ES_MULTILINE
)
||
!
(
es
->
style
&
ES_WANTRETURN
))
{
HWND
hwndParent
=
GetParent
(
es
->
hwndSelf
);
DWORD
dw
=
SendMessageW
(
hwndParent
,
DM_GETDEFID
,
0
,
0
);
HWND
hwndParent
;
DWORD
dw
;
if
(
!
EDIT_IsInsideDialog
(
es
))
return
1
;
hwndParent
=
GetParent
(
es
->
hwndSelf
);
dw
=
SendMessageW
(
hwndParent
,
DM_GETDEFID
,
0
,
0
);
if
(
HIWORD
(
dw
)
==
DC_HASDEFID
)
{
SendMessageW
(
hwndParent
,
WM_COMMAND
,
...
...
dlls/user32/tests/edit.c
View file @
2f0b1112
...
...
@@ -1932,8 +1932,8 @@ static void test_child_edit_wmkeydown(void)
hwParent
=
GetParent
(
hwEdit
);
SetWindowLong
(
hwParent
,
GWL_WNDPROC
,
(
LONG
)
child_edit_wmkeydown_proc
);
r
=
SendMessage
(
hwEdit
,
WM_KEYDOWN
,
VK_RETURN
,
0x1c0001
);
todo_wine
ok
(
1
==
r
,
"expected 1, got %d
\n
"
,
r
);
todo_wine
ok
(
0
==
child_edit_wmkeydown_num_messages
,
"expected 0, got %d
\n
"
,
child_edit_wmkeydown_num_messages
);
ok
(
1
==
r
,
"expected 1, got %d
\n
"
,
r
);
ok
(
0
==
child_edit_wmkeydown_num_messages
,
"expected 0, got %d
\n
"
,
child_edit_wmkeydown_num_messages
);
destroy_child_editcontrol
(
hwEdit
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment