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
a746e3b7
Commit
a746e3b7
authored
Sep 25, 2004
by
Robert Shearman
Committed by
Alexandre Julliard
Sep 25, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check in client area before caption area, because the app may have
changed the NC area in WM_NCCALCSIZE.
parent
91704df4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
22 deletions
+23
-22
nonclient.c
windows/nonclient.c
+23
-22
No files found.
windows/nonclient.c
View file @
a746e3b7
...
...
@@ -478,7 +478,8 @@ END:
static
LONG
NC_DoNCHitTest
(
WND
*
wndPtr
,
POINT
pt
)
{
RECT
rect
;
RECT
rect
,
rcClient
;
POINT
ptClient
;
TRACE
(
"hwnd=%p pt=%ld,%ld
\n
"
,
wndPtr
->
hwndSelf
,
pt
.
x
,
pt
.
y
);
...
...
@@ -487,6 +488,12 @@ static LONG NC_DoNCHitTest (WND *wndPtr, POINT pt )
if
(
wndPtr
->
dwStyle
&
WS_MINIMIZE
)
return
HTCAPTION
;
/* Check client area */
ptClient
=
pt
;
ScreenToClient
(
wndPtr
->
hwndSelf
,
&
ptClient
);
GetClientRect
(
wndPtr
->
hwndSelf
,
&
rcClient
);
if
(
PtInRect
(
&
rcClient
,
ptClient
))
return
HTCLIENT
;
/* Check borders */
if
(
HAS_THICKFRAME
(
wndPtr
->
dwStyle
,
wndPtr
->
dwExStyle
))
{
...
...
@@ -571,45 +578,39 @@ static LONG NC_DoNCHitTest (WND *wndPtr, POINT pt )
}
}
/* Check client area */
ScreenToClient
(
wndPtr
->
hwndSelf
,
&
pt
);
GetClientRect
(
wndPtr
->
hwndSelf
,
&
rect
);
if
(
PtInRect
(
&
rect
,
pt
))
return
HTCLIENT
;
/* Check vertical scroll bar */
if
(
wndPtr
->
dwStyle
&
WS_VSCROLL
)
{
if
((
wndPtr
->
dwExStyle
&
WS_EX_LEFTSCROLLBAR
)
!=
0
)
r
ec
t
.
left
-=
GetSystemMetrics
(
SM_CXVSCROLL
);
r
cClien
t
.
left
-=
GetSystemMetrics
(
SM_CXVSCROLL
);
else
r
ec
t
.
right
+=
GetSystemMetrics
(
SM_CXVSCROLL
);
if
(
PtInRect
(
&
r
ect
,
p
t
))
return
HTVSCROLL
;
r
cClien
t
.
right
+=
GetSystemMetrics
(
SM_CXVSCROLL
);
if
(
PtInRect
(
&
r
cClient
,
ptClien
t
))
return
HTVSCROLL
;
}
/* Check horizontal scroll bar */
if
(
wndPtr
->
dwStyle
&
WS_HSCROLL
)
{
rec
t
.
bottom
+=
GetSystemMetrics
(
SM_CYHSCROLL
);
if
(
PtInRect
(
&
rect
,
p
t
))
{
/* Check size box */
if
((
wndPtr
->
dwStyle
&
WS_VSCROLL
)
&&
((((
wndPtr
->
dwExStyle
&
WS_EX_LEFTSCROLLBAR
)
!=
0
)
&&
(
pt
.
x
<=
rec
t
.
left
+
GetSystemMetrics
(
SM_CXVSCROLL
)))
||
(((
wndPtr
->
dwExStyle
&
WS_EX_LEFTSCROLLBAR
)
==
0
)
&&
(
pt
.
x
>=
rec
t
.
right
-
GetSystemMetrics
(
SM_CXVSCROLL
)))))
return
HTSIZE
;
return
HTHSCROLL
;
}
rcClien
t
.
bottom
+=
GetSystemMetrics
(
SM_CYHSCROLL
);
if
(
PtInRect
(
&
rcClient
,
ptClien
t
))
{
/* Check size box */
if
((
wndPtr
->
dwStyle
&
WS_VSCROLL
)
&&
((((
wndPtr
->
dwExStyle
&
WS_EX_LEFTSCROLLBAR
)
!=
0
)
&&
(
ptClient
.
x
<=
rcClien
t
.
left
+
GetSystemMetrics
(
SM_CXVSCROLL
)))
||
(((
wndPtr
->
dwExStyle
&
WS_EX_LEFTSCROLLBAR
)
==
0
)
&&
(
ptClient
.
x
>=
rcClien
t
.
right
-
GetSystemMetrics
(
SM_CXVSCROLL
)))))
return
HTSIZE
;
return
HTHSCROLL
;
}
}
/* Check menu bar */
if
(
HAS_MENU
(
wndPtr
))
{
if
((
pt
.
y
<
0
)
&&
(
pt
.
x
>=
0
)
&&
(
pt
.
x
<
rec
t
.
right
))
return
HTMENU
;
if
((
ptClient
.
y
<
0
)
&&
(
ptClient
.
x
>=
0
)
&&
(
ptClient
.
x
<
rcClien
t
.
right
))
return
HTMENU
;
}
/* Has to return HTNOWHERE if nothing was found
...
...
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