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
5d1a1471
Commit
5d1a1471
authored
Feb 15, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Add mouse tracking on caption right-clicks to avoid messing with the capture.
parent
64e2d263
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
11 deletions
+40
-11
controls.h
dlls/user32/controls.h
+1
-0
defwnd.c
dlls/user32/defwnd.c
+1
-11
nonclient.c
dlls/user32/nonclient.c
+38
-0
No files found.
dlls/user32/controls.h
View file @
5d1a1471
...
...
@@ -170,6 +170,7 @@ extern LRESULT NC_HandleNCActivate( HWND hwnd, WPARAM wParam, LPARAM lParam ) DE
extern
LRESULT
NC_HandleNCCalcSize
(
HWND
hwnd
,
WPARAM
wParam
,
RECT
*
winRect
)
DECLSPEC_HIDDEN
;
extern
LRESULT
NC_HandleNCHitTest
(
HWND
hwnd
,
POINT
pt
)
DECLSPEC_HIDDEN
;
extern
LRESULT
NC_HandleNCLButtonDown
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
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 @
5d1a1471
...
...
@@ -334,21 +334,11 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
return
NC_HandleNCLButtonDblClk
(
hwnd
,
wParam
,
lParam
);
case
WM_NCRBUTTONDOWN
:
/* in Windows, capture is taken when right-clicking on the caption bar */
if
(
wParam
==
HTCAPTION
)
{
SetCapture
(
hwnd
);
}
break
;
return
NC_HandleNCRButtonDown
(
hwnd
,
wParam
,
lParam
);
case
WM_RBUTTONUP
:
{
POINT
pt
;
if
(
hwnd
==
GetCapture
())
/* release capture if we took it on WM_NCRBUTTONDOWN */
ReleaseCapture
();
pt
.
x
=
(
short
)
LOWORD
(
lParam
);
pt
.
y
=
(
short
)
HIWORD
(
lParam
);
ClientToScreen
(
hwnd
,
&
pt
);
...
...
dlls/user32/nonclient.c
View file @
5d1a1471
...
...
@@ -1462,6 +1462,44 @@ LRESULT NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam )
/***********************************************************************
* NC_HandleNCRButtonDown
*
* Handle a WM_NCRBUTTONDOWN message. Called from DefWindowProc().
*/
LRESULT
NC_HandleNCRButtonDown
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
)
{
MSG
msg
;
INT
hittest
=
wParam
;
HMENU
hSysMenu
=
GetSystemMenu
(
hwnd
,
FALSE
);
switch
(
hittest
)
{
case
HTCAPTION
:
case
HTSYSMENU
:
hSysMenu
=
GetSystemMenu
(
hwnd
,
FALSE
);
if
(
!
hSysMenu
)
break
;
SetCapture
(
hwnd
);
for
(;;)
{
if
(
!
GetMessageW
(
&
msg
,
0
,
WM_MOUSEFIRST
,
WM_MOUSELAST
))
break
;
if
(
CallMsgFilterW
(
&
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_SYSCOMMAND
,
SC_MOUSEMENU
+
HTSYSMENU
,
msg
.
lParam
);
break
;
}
return
0
;
}
/***********************************************************************
* NC_HandleNCLButtonDblClk
*
* Handle a WM_NCLBUTTONDBLCLK message. Called from DefWindowProc().
...
...
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