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
389832e0
Commit
389832e0
authored
Jun 15, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Move WM_NCRBUTTONDOWN implementation from user32.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
parent
8ddf64b6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
38 deletions
+31
-38
controls.h
dlls/user32/controls.h
+0
-1
defwnd.c
dlls/user32/defwnd.c
+0
-3
nonclient.c
dlls/user32/nonclient.c
+0
-34
defwnd.c
dlls/win32u/defwnd.c
+31
-0
No files found.
dlls/user32/controls.h
View file @
389832e0
...
...
@@ -123,7 +123,6 @@ extern HMENU MENU_GetSysMenu( HWND hWnd, HMENU hPopupMenu ) DECLSPEC_HIDDEN;
extern
LRESULT
NC_HandleNCHitTest
(
HWND
hwnd
,
POINT
pt
)
DECLSPEC_HIDDEN
;
extern
LRESULT
NC_HandleNCMouseMove
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
DECLSPEC_HIDDEN
;
extern
LRESULT
NC_HandleNCMouseLeave
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
LRESULT
NC_HandleNCRButtonDown
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
DECLSPEC_HIDDEN
;
extern
LRESULT
NC_HandleNCLButtonDblClk
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
DECLSPEC_HIDDEN
;
extern
LRESULT
NC_HandleSysCommand
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
DECLSPEC_HIDDEN
;
extern
LRESULT
NC_HandleSetCursor
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
DECLSPEC_HIDDEN
;
...
...
dlls/user32/defwnd.c
View file @
389832e0
...
...
@@ -181,9 +181,6 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
case
WM_NCLBUTTONDBLCLK
:
return
NC_HandleNCLButtonDblClk
(
hwnd
,
wParam
,
lParam
);
case
WM_NCRBUTTONDOWN
:
return
NC_HandleNCRButtonDown
(
hwnd
,
wParam
,
lParam
);
case
WM_RBUTTONUP
:
{
POINT
pt
;
...
...
dlls/user32/nonclient.c
View file @
389832e0
...
...
@@ -718,40 +718,6 @@ static void NC_TrackScrollBar( HWND hwnd, WPARAM wParam, POINT pt )
/***********************************************************************
* NC_HandleNCRButtonDown
*
* Handle a WM_NCRBUTTONDOWN message. Called from DefWindowProc().
*/
LRESULT
NC_HandleNCRButtonDown
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
{
MSG
msg
;
INT
hittest
=
wParam
;
switch
(
hittest
)
{
case
HTCAPTION
:
case
HTSYSMENU
:
NtUserSetCapture
(
hwnd
);
for
(;;)
{
if
(
!
GetMessageW
(
&
msg
,
0
,
WM_MOUSEFIRST
,
WM_MOUSELAST
))
break
;
if
(
NtUserCallMsgFilter
(
&
msg
,
MSGF_MAX
))
continue
;
if
(
msg
.
message
==
WM_RBUTTONUP
)
{
hittest
=
NC_HandleNCHitTest
(
hwnd
,
msg
.
pt
);
break
;
}
}
ReleaseCapture
();
if
(
hittest
==
HTCAPTION
||
hittest
==
HTSYSMENU
)
SendMessageW
(
hwnd
,
WM_CONTEXTMENU
,
(
WPARAM
)
hwnd
,
MAKELPARAM
(
msg
.
pt
.
x
,
msg
.
pt
.
y
));
break
;
}
return
0
;
}
/***********************************************************************
* NC_HandleNCLButtonDblClk
*
* Handle a WM_NCLBUTTONDBLCLK message. Called from DefWindowProc().
...
...
dlls/win32u/defwnd.c
View file @
389832e0
...
...
@@ -1961,6 +1961,34 @@ static LRESULT handle_nc_lbutton_down( HWND hwnd, WPARAM wparam, LPARAM lparam )
return
0
;
}
static
LRESULT
handle_nc_rbutton_down
(
HWND
hwnd
,
WPARAM
wparam
,
LPARAM
lparam
)
{
int
hittest
=
wparam
;
MSG
msg
;
switch
(
hittest
)
{
case
HTCAPTION
:
case
HTSYSMENU
:
NtUserSetCapture
(
hwnd
);
for
(;;)
{
if
(
!
NtUserGetMessage
(
&
msg
,
0
,
WM_MOUSEFIRST
,
WM_MOUSELAST
))
break
;
if
(
NtUserCallMsgFilter
(
&
msg
,
MSGF_MAX
))
continue
;
if
(
msg
.
message
==
WM_RBUTTONUP
)
{
hittest
=
handle_nc_hit_test
(
hwnd
,
msg
.
pt
);
break
;
}
}
release_capture
();
if
(
hittest
==
HTCAPTION
||
hittest
==
HTSYSMENU
)
send_message
(
hwnd
,
WM_CONTEXTMENU
,
(
WPARAM
)
hwnd
,
MAKELPARAM
(
msg
.
pt
.
x
,
msg
.
pt
.
y
));
break
;
}
return
0
;
}
LRESULT
default_window_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
,
BOOL
ansi
)
{
LRESULT
result
=
0
;
...
...
@@ -2009,6 +2037,9 @@ LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
case
WM_NCLBUTTONDOWN
:
return
handle_nc_lbutton_down
(
hwnd
,
wparam
,
lparam
);
case
WM_NCRBUTTONDOWN
:
return
handle_nc_rbutton_down
(
hwnd
,
wparam
,
lparam
);
case
WM_WINDOWPOSCHANGING
:
return
handle_window_pos_changing
(
hwnd
,
(
WINDOWPOS
*
)
lparam
);
...
...
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