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
0bfc8f05
Commit
0bfc8f05
authored
Apr 08, 2014
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Apr 08, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Don't emit WM_COMMAND on choosing an item in a context menu (Edit control).
parent
1ba63827
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
edit.c
dlls/user32/edit.c
+9
-10
edit.c
dlls/user32/tests/edit.c
+1
-1
No files found.
dlls/user32/edit.c
View file @
0bfc8f05
...
...
@@ -3244,14 +3244,11 @@ static LRESULT EDIT_WM_Char(EDITSTATE *es, WCHAR c)
/*********************************************************************
*
*
WM_COMMAND
*
EDIT_ContextMenuCommand
*
*/
static
void
EDIT_
WM_Command
(
EDITSTATE
*
es
,
INT
code
,
INT
id
,
HWND
control
)
static
void
EDIT_
ContextMenuCommand
(
EDITSTATE
*
es
,
UINT
id
)
{
if
(
code
||
control
)
return
;
switch
(
id
)
{
case
EM_UNDO
:
SendMessageW
(
es
->
hwndSelf
,
WM_UNDO
,
0
,
0
);
...
...
@@ -3301,6 +3298,7 @@ static void EDIT_WM_ContextMenu(EDITSTATE *es, INT x, INT y)
HMENU
popup
=
GetSubMenu
(
menu
,
0
);
UINT
start
=
es
->
selection_start
;
UINT
end
=
es
->
selection_end
;
UINT
cmd
;
ORDER_UINT
(
start
,
end
);
...
...
@@ -3329,7 +3327,12 @@ static void EDIT_WM_ContextMenu(EDITSTATE *es, INT x, INT y)
if
(
!
(
es
->
flags
&
EF_FOCUSED
))
SetFocus
(
es
->
hwndSelf
);
TrackPopupMenu
(
popup
,
TPM_LEFTALIGN
|
TPM_RIGHTBUTTON
,
x
,
y
,
0
,
es
->
hwndSelf
,
NULL
);
cmd
=
TrackPopupMenu
(
popup
,
TPM_LEFTALIGN
|
TPM_RIGHTBUTTON
|
TPM_RETURNCMD
|
TPM_NONOTIFY
,
x
,
y
,
0
,
es
->
hwndSelf
,
NULL
);
if
(
cmd
)
EDIT_ContextMenuCommand
(
es
,
cmd
);
DestroyMenu
(
menu
);
}
...
...
@@ -4984,10 +4987,6 @@ LRESULT EditWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, B
EDIT_WM_Clear
(
es
);
break
;
case
WM_COMMAND
:
EDIT_WM_Command
(
es
,
HIWORD
(
wParam
),
LOWORD
(
wParam
),
(
HWND
)
lParam
);
break
;
case
WM_CONTEXTMENU
:
EDIT_WM_ContextMenu
(
es
,
(
short
)
LOWORD
(
lParam
),
(
short
)
HIWORD
(
lParam
));
break
;
...
...
dlls/user32/tests/edit.c
View file @
0bfc8f05
...
...
@@ -2323,7 +2323,7 @@ static void test_contextmenu(void)
SendMessageA
(
hwndEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
"foo"
);
SendMessageA
(
hwndEdit
,
WM_CONTEXTMENU
,
(
WPARAM
)
hwndEdit
,
MAKEWORD
(
-
1
,
-
1
));
while
(
PeekMessageA
(
&
msg
,
hwndEdit
,
0
,
0
,
PM_REMOVE
))
DispatchMessageA
(
&
msg
);
todo_wine
ok
(
menu_messages
.
wm_command
==
0
,
ok
(
menu_messages
.
wm_command
==
0
,
"Expected no WM_COMMAND messages, got %d
\n
"
,
menu_messages
.
wm_command
);
todo_wine
ok
(
menu_messages
.
em_setsel
==
1
,
"Expected 1 EM_SETSEL message, got %d
\n
"
,
menu_messages
.
em_setsel
);
...
...
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