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
9b24af8a
Commit
9b24af8a
authored
Feb 06, 2004
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Feb 06, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test case and a fix for the window styles state at the window
creation time.
parent
d18c8ca7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
13 deletions
+19
-13
win.c
dlls/user/tests/win.c
+7
-0
win.c
windows/win.c
+12
-13
No files found.
dlls/user/tests/win.c
View file @
9b24af8a
...
...
@@ -556,10 +556,17 @@ static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam)
{
case
HCBT_CREATEWND
:
{
DWORD
style
;
CBT_CREATEWNDA
*
createwnd
=
(
CBT_CREATEWNDA
*
)
lParam
;
trace
(
"HCBT_CREATEWND: hwnd %p, parent %p, style %08lx
\n
"
,
(
HWND
)
wParam
,
createwnd
->
lpcs
->
hwndParent
,
createwnd
->
lpcs
->
style
);
ok
(
createwnd
->
hwndInsertAfter
==
HWND_TOP
,
"hwndInsertAfter should be always HWND_TOP
\n
"
);
/* WS_VISIBLE should be turned off yet */
style
=
createwnd
->
lpcs
->
style
&
~
WS_VISIBLE
;
ok
(
style
==
GetWindowLongA
((
HWND
)
wParam
,
GWL_STYLE
),
"style of hwnd and style in the CREATESTRUCT do not match: %08lx != %08lx
\n
"
,
GetWindowLongA
((
HWND
)
wParam
,
GWL_STYLE
),
style
);
break
;
}
}
...
...
windows/win.c
View file @
9b24af8a
...
...
@@ -1105,10 +1105,10 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
WIN_FixCoordinates
(
cs
,
&
sw
);
/* fix default coordinates */
/* Correct the window style
- stage 1
/* Correct the window style
s.
*
*
These are patches that appear to affect both the style loaded into the
*
WIN structure and passed in the CreateStruct to the WM_CREATE etc
.
*
It affects both the style loaded into the WIN structure and
*
passed in the CREATESTRUCT to the WM_[NC]CREATE
.
*
* WS_EX_WINDOWEDGE appears to be enforced based on the other styles, so
* why does the user get to set it?
...
...
@@ -1124,6 +1124,13 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
else
cs
->
dwExStyle
&=
~
WS_EX_WINDOWEDGE
;
if
(
!
(
cs
->
style
&
WS_CHILD
))
{
cs
->
style
|=
WS_CLIPSIBLINGS
;
if
(
!
(
cs
->
style
&
WS_POPUP
))
cs
->
style
|=
WS_CAPTION
;
}
/* Create the window structure */
if
(
!
(
wndPtr
=
create_window_handle
(
parent
,
owner
,
classAtom
,
cs
->
hInstance
,
type
)))
...
...
@@ -1154,17 +1161,9 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
wndPtr
->
hIconSmall
=
0
;
wndPtr
->
hSysMenu
=
(
wndPtr
->
dwStyle
&
WS_SYSMENU
)
?
MENU_GetSysMenu
(
hwnd
,
0
)
:
0
;
/* Correct the window style - stage 2 */
if
(
!
(
cs
->
style
&
(
WS_CHILD
|
WS_POPUP
)))
wndPtr
->
flags
|=
WIN_NEED_SIZE
;
if
(
!
(
cs
->
style
&
WS_CHILD
))
{
wndPtr
->
dwStyle
|=
WS_CLIPSIBLINGS
;
if
(
!
(
cs
->
style
&
WS_POPUP
))
{
wndPtr
->
dwStyle
|=
WS_CAPTION
;
wndPtr
->
flags
|=
WIN_NEED_SIZE
;
}
}
SERVER_START_REQ
(
set_window_info
)
{
req
->
handle
=
hwnd
;
...
...
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