Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
2799be18
Commit
2799be18
authored
Feb 22, 2017
by
Alex Henrie
Committed by
Alexandre Julliard
Feb 23, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Translate WM_(NC)XBUTTONUP to WM_APPCOMMAND in DefWindowProc.
Signed-off-by:
Alex Henrie
<
alexhenrie24@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fef10cbe
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
0 deletions
+37
-0
defwnd.c
dlls/user32/defwnd.c
+9
-0
msg.c
dlls/user32/tests/msg.c
+28
-0
No files found.
dlls/user32/defwnd.c
View file @
2799be18
...
@@ -291,6 +291,15 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
...
@@ -291,6 +291,15 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
*/
*/
break
;
break
;
case
WM_XBUTTONUP
:
case
WM_NCXBUTTONUP
:
if
(
HIWORD
(
wParam
)
==
XBUTTON1
||
HIWORD
(
wParam
)
==
XBUTTON2
)
{
SendMessageW
(
hwnd
,
WM_APPCOMMAND
,
(
WPARAM
)
hwnd
,
MAKELPARAM
(
LOWORD
(
wParam
),
FAPPCOMMAND_MOUSE
|
HIWORD
(
wParam
)));
}
break
;
case
WM_CONTEXTMENU
:
case
WM_CONTEXTMENU
:
if
(
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
WS_CHILD
)
if
(
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
WS_CHILD
)
SendMessageW
(
GetParent
(
hwnd
),
msg
,
wParam
,
lParam
);
SendMessageW
(
GetParent
(
hwnd
),
msg
,
wParam
,
lParam
);
...
...
dlls/user32/tests/msg.c
View file @
2799be18
...
@@ -14378,6 +14378,18 @@ static const struct message NCRBUTTONDOWNSeq[] =
...
@@ -14378,6 +14378,18 @@ static const struct message NCRBUTTONDOWNSeq[] =
{
0
}
{
0
}
};
};
static
const
struct
message
NCXBUTTONUPSeq1
[]
=
{
{
WM_APPCOMMAND
,
sent
|
lparam
,
/*hwnd*/
0
,
MAKELPARAM
(
0
,
FAPPCOMMAND_MOUSE
|
APPCOMMAND_BROWSER_BACKWARD
)
},
{
0
}
};
static
const
struct
message
NCXBUTTONUPSeq2
[]
=
{
{
WM_APPCOMMAND
,
sent
|
lparam
,
/*hwnd*/
0
,
MAKELPARAM
(
0
,
FAPPCOMMAND_MOUSE
|
APPCOMMAND_BROWSER_FORWARD
)
},
{
0
}
};
struct
rbuttonup_thread_data
struct
rbuttonup_thread_data
{
{
HWND
hwnd
;
HWND
hwnd
;
...
@@ -14437,6 +14449,22 @@ static void test_defwinproc(void)
...
@@ -14437,6 +14449,22 @@ static void test_defwinproc(void)
DefWindowProcA
(
hwnd
,
WM_NCRBUTTONDOWN
,
HTCAPTION
,
MAKELPARAM
(
x
,
y
));
DefWindowProcA
(
hwnd
,
WM_NCRBUTTONDOWN
,
HTCAPTION
,
MAKELPARAM
(
x
,
y
));
ok_sequence
(
NCRBUTTONDOWNSeq
,
"WM_NCRBUTTONDOWN on caption"
,
FALSE
);
ok_sequence
(
NCRBUTTONDOWNSeq
,
"WM_NCRBUTTONDOWN on caption"
,
FALSE
);
res
=
DefWindowProcA
(
hwnd
,
WM_NCXBUTTONUP
,
0
,
MAKELPARAM
(
x
,
y
));
ok
(
!
res
,
"WM_NCXBUTTONUP returned %ld
\n
"
,
res
);
ok_sequence
(
WmEmptySeq
,
"WM_NCXBUTTONUP without button"
,
FALSE
);
res
=
DefWindowProcA
(
hwnd
,
WM_NCXBUTTONUP
,
MAKEWPARAM
(
0
,
XBUTTON1
),
MAKELPARAM
(
x
,
y
));
ok
(
!
res
,
"WM_NCXBUTTONUP returned %ld
\n
"
,
res
);
ok_sequence
(
NCXBUTTONUPSeq1
,
"WM_NCXBUTTONUP with XBUTTON1"
,
FALSE
);
res
=
DefWindowProcA
(
hwnd
,
WM_NCXBUTTONUP
,
MAKEWPARAM
(
0
,
XBUTTON2
),
MAKELPARAM
(
x
,
y
));
ok
(
!
res
,
"WM_NCXBUTTONUP returned %ld
\n
"
,
res
);
ok_sequence
(
NCXBUTTONUPSeq2
,
"WM_NCXBUTTONUP with XBUTTON2"
,
FALSE
);
res
=
DefWindowProcA
(
hwnd
,
WM_NCXBUTTONUP
,
MAKEWPARAM
(
0
,
3
),
MAKELPARAM
(
x
,
y
));
ok
(
!
res
,
"WM_NCXBUTTONUP returned %ld
\n
"
,
res
);
ok_sequence
(
WmEmptySeq
,
"WM_NCXBUTTONUP with invalid button"
,
FALSE
);
SetEvent
(
data
.
wndproc_finished
);
SetEvent
(
data
.
wndproc_finished
);
WaitForSingleObject
(
thread
,
1000
);
WaitForSingleObject
(
thread
,
1000
);
CloseHandle
(
data
.
wndproc_finished
);
CloseHandle
(
data
.
wndproc_finished
);
...
...
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