Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
7370a565
Commit
7370a565
authored
Nov 01, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Delay registration of the builtin classes until the first window is created.
parent
13149b67
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
5 deletions
+26
-5
class.c
dlls/user32/class.c
+23
-2
user_main.c
dlls/user32/user_main.c
+0
-3
win.c
dlls/user32/win.c
+3
-0
No files found.
dlls/user32/class.c
View file @
7370a565
...
...
@@ -64,6 +64,7 @@ typedef struct tagCLASS
}
CLASS
;
static
struct
list
class_list
=
LIST_INIT
(
class_list
);
static
INIT_ONCE
init_once
=
INIT_ONCE_STATIC_INIT
;
#define CLASS_OTHER_PROCESS ((CLASS *)1)
...
...
@@ -376,9 +377,9 @@ static void register_builtin( const struct builtin_class_descr *descr )
/***********************************************************************
*
CLASS_RegisterBuiltinClasse
s
*
register_builtin
s
*/
void
CLASS_RegisterBuiltinClasses
(
void
)
static
BOOL
WINAPI
register_builtins
(
INIT_ONCE
*
once
,
void
*
param
,
void
**
context
)
{
register_builtin
(
&
DESKTOP_builtin_class
);
register_builtin
(
&
BUTTON_builtin_class
);
...
...
@@ -393,6 +394,16 @@ void CLASS_RegisterBuiltinClasses(void)
register_builtin
(
&
MESSAGE_builtin_class
);
register_builtin
(
&
SCROLL_builtin_class
);
register_builtin
(
&
STATIC_builtin_class
);
return
TRUE
;
}
/***********************************************************************
* CLASS_RegisterBuiltinClasses
*/
void
CLASS_RegisterBuiltinClasses
(
void
)
{
InitOnceExecuteOnce
(
&
init_once
,
register_builtins
,
NULL
,
NULL
);
}
...
...
@@ -488,6 +499,8 @@ ATOM WINAPI RegisterClassExA( const WNDCLASSEXA* wc )
CLASS
*
classPtr
;
HINSTANCE
instance
;
InitOnceExecuteOnce
(
&
init_once
,
register_builtins
,
NULL
,
NULL
);
if
(
wc
->
cbSize
!=
sizeof
(
*
wc
)
||
wc
->
cbClsExtra
<
0
||
wc
->
cbWndExtra
<
0
||
wc
->
hInstance
==
user32_module
)
/* we can't register a class for user32 */
{
...
...
@@ -541,6 +554,8 @@ ATOM WINAPI RegisterClassExW( const WNDCLASSEXW* wc )
CLASS
*
classPtr
;
HINSTANCE
instance
;
InitOnceExecuteOnce
(
&
init_once
,
register_builtins
,
NULL
,
NULL
);
if
(
wc
->
cbSize
!=
sizeof
(
*
wc
)
||
wc
->
cbClsExtra
<
0
||
wc
->
cbWndExtra
<
0
||
wc
->
hInstance
==
user32_module
)
/* we can't register a class for user32 */
{
...
...
@@ -597,6 +612,8 @@ BOOL WINAPI UnregisterClassW( LPCWSTR className, HINSTANCE hInstance )
{
CLASS
*
classPtr
=
NULL
;
InitOnceExecuteOnce
(
&
init_once
,
register_builtins
,
NULL
,
NULL
);
SERVER_START_REQ
(
destroy_class
)
{
req
->
instance
=
wine_server_client_ptr
(
hInstance
);
...
...
@@ -1097,6 +1114,8 @@ BOOL WINAPI GetClassInfoExA( HINSTANCE hInstance, LPCSTR name, WNDCLASSEXA *wc )
TRACE
(
"%p %s %p
\n
"
,
hInstance
,
debugstr_a
(
name
),
wc
);
InitOnceExecuteOnce
(
&
init_once
,
register_builtins
,
NULL
,
NULL
);
if
(
!
wc
)
{
SetLastError
(
ERROR_NOACCESS
);
...
...
@@ -1148,6 +1167,8 @@ BOOL WINAPI GetClassInfoExW( HINSTANCE hInstance, LPCWSTR name, WNDCLASSEXW *wc
TRACE
(
"%p %s %p
\n
"
,
hInstance
,
debugstr_w
(
name
),
wc
);
InitOnceExecuteOnce
(
&
init_once
,
register_builtins
,
NULL
,
NULL
);
if
(
!
wc
)
{
SetLastError
(
ERROR_NOACCESS
);
...
...
dlls/user32/user_main.c
View file @
7370a565
...
...
@@ -278,9 +278,6 @@ static BOOL process_attach(void)
/* Setup palette function pointers */
palette_init
();
/* Initialize built-in window classes */
CLASS_RegisterBuiltinClasses
();
return
TRUE
;
}
...
...
dlls/user32/win.c
View file @
7370a565
...
...
@@ -1391,6 +1391,8 @@ HWND WIN_CreateWindowEx( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module,
}
}
CLASS_RegisterBuiltinClasses
();
/* Find the parent window */
parent
=
cs
->
hwndParent
;
...
...
@@ -1424,6 +1426,7 @@ HWND WIN_CreateWindowEx( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module,
SetLastError
(
ERROR_TLW_WITH_WSCHILD
);
return
0
;
/* WS_CHILD needs a parent, but WS_POPUP doesn't */
}
/* are we creating the desktop or HWND_MESSAGE parent itself? */
if
(
className
!=
(
LPCWSTR
)
DESKTOP_CLASS_ATOM
&&
(
IS_INTRESOURCE
(
className
)
||
strcmpiW
(
className
,
messageW
)))
...
...
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