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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
15 deletions
+16
-15
nonclient.c
windows/nonclient.c
+16
-15
No files found.
windows/nonclient.c
View file @
a746e3b7
...
@@ -478,7 +478,8 @@ END:
...
@@ -478,7 +478,8 @@ END:
static
LONG
NC_DoNCHitTest
(
WND
*
wndPtr
,
POINT
pt
)
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
);
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 )
...
@@ -487,6 +488,12 @@ static LONG NC_DoNCHitTest (WND *wndPtr, POINT pt )
if
(
wndPtr
->
dwStyle
&
WS_MINIMIZE
)
return
HTCAPTION
;
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 */
/* Check borders */
if
(
HAS_THICKFRAME
(
wndPtr
->
dwStyle
,
wndPtr
->
dwExStyle
))
if
(
HAS_THICKFRAME
(
wndPtr
->
dwStyle
,
wndPtr
->
dwExStyle
))
{
{
...
@@ -571,34 +578,28 @@ static LONG NC_DoNCHitTest (WND *wndPtr, POINT pt )
...
@@ -571,34 +578,28 @@ 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 */
/* Check vertical scroll bar */
if
(
wndPtr
->
dwStyle
&
WS_VSCROLL
)
if
(
wndPtr
->
dwStyle
&
WS_VSCROLL
)
{
{
if
((
wndPtr
->
dwExStyle
&
WS_EX_LEFTSCROLLBAR
)
!=
0
)
if
((
wndPtr
->
dwExStyle
&
WS_EX_LEFTSCROLLBAR
)
!=
0
)
r
ec
t
.
left
-=
GetSystemMetrics
(
SM_CXVSCROLL
);
r
cClien
t
.
left
-=
GetSystemMetrics
(
SM_CXVSCROLL
);
else
else
r
ec
t
.
right
+=
GetSystemMetrics
(
SM_CXVSCROLL
);
r
cClien
t
.
right
+=
GetSystemMetrics
(
SM_CXVSCROLL
);
if
(
PtInRect
(
&
r
ect
,
p
t
))
return
HTVSCROLL
;
if
(
PtInRect
(
&
r
cClient
,
ptClien
t
))
return
HTVSCROLL
;
}
}
/* Check horizontal scroll bar */
/* Check horizontal scroll bar */
if
(
wndPtr
->
dwStyle
&
WS_HSCROLL
)
if
(
wndPtr
->
dwStyle
&
WS_HSCROLL
)
{
{
rec
t
.
bottom
+=
GetSystemMetrics
(
SM_CYHSCROLL
);
rcClien
t
.
bottom
+=
GetSystemMetrics
(
SM_CYHSCROLL
);
if
(
PtInRect
(
&
rect
,
p
t
))
if
(
PtInRect
(
&
rcClient
,
ptClien
t
))
{
{
/* Check size box */
/* Check size box */
if
((
wndPtr
->
dwStyle
&
WS_VSCROLL
)
&&
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
)
&&
(
ptClient
.
x
<=
rcClien
t
.
left
+
GetSystemMetrics
(
SM_CXVSCROLL
)))
||
(((
wndPtr
->
dwExStyle
&
WS_EX_LEFTSCROLLBAR
)
==
0
)
&&
(
pt
.
x
>=
rec
t
.
right
-
GetSystemMetrics
(
SM_CXVSCROLL
)))))
(((
wndPtr
->
dwExStyle
&
WS_EX_LEFTSCROLLBAR
)
==
0
)
&&
(
ptClient
.
x
>=
rcClien
t
.
right
-
GetSystemMetrics
(
SM_CXVSCROLL
)))))
return
HTSIZE
;
return
HTSIZE
;
return
HTHSCROLL
;
return
HTHSCROLL
;
}
}
...
@@ -608,7 +609,7 @@ static LONG NC_DoNCHitTest (WND *wndPtr, POINT pt )
...
@@ -608,7 +609,7 @@ static LONG NC_DoNCHitTest (WND *wndPtr, POINT pt )
if
(
HAS_MENU
(
wndPtr
))
if
(
HAS_MENU
(
wndPtr
))
{
{
if
((
pt
.
y
<
0
)
&&
(
pt
.
x
>=
0
)
&&
(
pt
.
x
<
rec
t
.
right
))
if
((
ptClient
.
y
<
0
)
&&
(
ptClient
.
x
>=
0
)
&&
(
ptClient
.
x
<
rcClien
t
.
right
))
return
HTMENU
;
return
HTMENU
;
}
}
...
...
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