Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
5d1a1471
Commit
5d1a1471
authored
13 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
user32: Add mouse tracking on caption right-clicks to avoid messing with the capture.
parent
64e2d263
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/user32/controls.h
+1
-0
1 addition, 0 deletions
dlls/user32/controls.h
dlls/user32/defwnd.c
+1
-11
1 addition, 11 deletions
dlls/user32/defwnd.c
dlls/user32/nonclient.c
+38
-0
38 additions, 0 deletions
dlls/user32/nonclient.c
with
40 additions
and
11 deletions
dlls/user32/controls.h
+
1
−
0
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
;
...
...
This diff is collapsed.
Click to expand it.
dlls/user32/defwnd.c
+
1
−
11
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
);
...
...
This diff is collapsed.
Click to expand it.
dlls/user32/nonclient.c
+
38
−
0
View file @
5d1a1471
...
...
@@ -1461,6 +1461,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
*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment