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
5714c4de
Commit
5714c4de
authored
May 08, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: The client rectangle is in screen coordinates for the initial WM_NCCALCSIZE.
parent
09cb4151
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
win.c
dlls/user32/tests/win.c
+9
-0
win.c
dlls/user32/win.c
+7
-0
No files found.
dlls/user32/tests/win.c
View file @
5714c4de
...
@@ -3929,6 +3929,15 @@ static LRESULT CALLBACK winsizes_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM
...
@@ -3929,6 +3929,15 @@ static LRESULT CALLBACK winsizes_wnd_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM
expected_rect
.
left
,
expected_rect
.
top
,
expected_rect
.
right
,
expected_rect
.
bottom
);
expected_rect
.
left
,
expected_rect
.
top
,
expected_rect
.
right
,
expected_rect
.
bottom
);
return
DefWindowProc
(
hwnd
,
msg
,
wp
,
lp
);
return
DefWindowProc
(
hwnd
,
msg
,
wp
,
lp
);
}
}
case
WM_NCCALCSIZE
:
{
RECT
rect
,
*
r
=
(
RECT
*
)
lp
;
GetWindowRect
(
hwnd
,
&
rect
);
ok
(
!
memcmp
(
&
rect
,
r
,
sizeof
(
rect
)
),
"passed rect %d,%d-%d,%d doesn't match window rect %d,%d-%d,%d
\n
"
,
r
->
left
,
r
->
top
,
r
->
right
,
r
->
bottom
,
rect
.
left
,
rect
.
top
,
rect
.
right
,
rect
.
bottom
);
return
DefWindowProc
(
hwnd
,
msg
,
wp
,
lp
);
}
default:
default:
return
DefWindowProc
(
hwnd
,
msg
,
wp
,
lp
);
return
DefWindowProc
(
hwnd
,
msg
,
wp
,
lp
);
}
}
...
...
dlls/user32/win.c
View file @
5714c4de
...
@@ -1139,11 +1139,18 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, LPCWSTR className, UINT flags
...
@@ -1139,11 +1139,18 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, LPCWSTR className, UINT flags
if
((
wndPtr
=
WIN_GetPtr
(
hwnd
)))
if
((
wndPtr
=
WIN_GetPtr
(
hwnd
)))
{
{
/* yes, even if the CBT hook was called with HWND_TOP */
/* yes, even if the CBT hook was called with HWND_TOP */
POINT
pt
;
HWND
insert_after
=
(
wndPtr
->
dwStyle
&
WS_CHILD
)
?
HWND_BOTTOM
:
HWND_TOP
;
HWND
insert_after
=
(
wndPtr
->
dwStyle
&
WS_CHILD
)
?
HWND_BOTTOM
:
HWND_TOP
;
RECT
window_rect
=
wndPtr
->
rectWindow
;
RECT
window_rect
=
wndPtr
->
rectWindow
;
RECT
client_rect
=
window_rect
;
RECT
client_rect
=
window_rect
;
WIN_ReleasePtr
(
wndPtr
);
WIN_ReleasePtr
(
wndPtr
);
/* the rectangle is in screen coords for WM_NCCALCSIZE when wparam is FALSE */
pt
.
x
=
pt
.
y
=
0
;
MapWindowPoints
(
parent
,
0
,
&
pt
,
1
);
OffsetRect
(
&
client_rect
,
pt
.
x
,
pt
.
y
);
SendMessageW
(
hwnd
,
WM_NCCALCSIZE
,
FALSE
,
(
LPARAM
)
&
client_rect
);
SendMessageW
(
hwnd
,
WM_NCCALCSIZE
,
FALSE
,
(
LPARAM
)
&
client_rect
);
OffsetRect
(
&
client_rect
,
-
pt
.
x
,
-
pt
.
y
);
set_window_pos
(
hwnd
,
insert_after
,
SWP_NOACTIVATE
,
&
window_rect
,
&
client_rect
,
NULL
);
set_window_pos
(
hwnd
,
insert_after
,
SWP_NOACTIVATE
,
&
window_rect
,
&
client_rect
,
NULL
);
}
}
else
return
0
;
else
return
0
;
...
...
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