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
e7243523
Commit
e7243523
authored
Jun 11, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 11, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Use additional atom to keep base class name.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c35b5b6d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
4 deletions
+33
-4
class.c
dlls/user32/class.c
+1
-0
server_protocol.h
include/wine/server_protocol.h
+3
-1
class.c
server/class.c
+25
-2
protocol.def
server/protocol.def
+1
-0
request.h
server/request.h
+2
-1
trace.c
server/trace.c
+1
-0
No files found.
dlls/user32/class.c
View file @
e7243523
...
...
@@ -487,6 +487,7 @@ static CLASS *CLASS_RegisterClass( LPCWSTR name, UINT basename_offset, HINSTANCE
req
->
win_extra
=
winExtra
;
req
->
client_ptr
=
wine_server_client_ptr
(
classPtr
);
req
->
atom
=
classPtr
->
atomName
;
req
->
name_offset
=
basename_offset
;
if
(
!
req
->
atom
&&
name
)
wine_server_add_data
(
req
,
name
,
strlenW
(
name
)
*
sizeof
(
WCHAR
)
);
ret
=
!
wine_server_call_err
(
req
);
classPtr
->
atomName
=
reply
->
atom
;
...
...
include/wine/server_protocol.h
View file @
e7243523
...
...
@@ -4480,7 +4480,9 @@ struct create_class_request
int
extra
;
int
win_extra
;
client_ptr_t
client_ptr
;
data_size_t
name_offset
;
/* VARARG(name,unicode_str); */
char
__pad_52
[
4
];
};
struct
create_class_reply
{
...
...
@@ -6510,6 +6512,6 @@ union generic_reply
struct
terminate_job_reply
terminate_job_reply
;
};
#define SERVER_PROTOCOL_VERSION 55
3
#define SERVER_PROTOCOL_VERSION 55
4
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/class.c
View file @
e7243523
...
...
@@ -46,6 +46,7 @@ struct window_class
int
count
;
/* reference count */
int
local
;
/* local class? */
atom_t
atom
;
/* class atom */
atom_t
base_atom
;
/* base class atom for versioned class */
mod_handle_t
instance
;
/* module instance */
unsigned
int
style
;
/* class style */
int
win_extra
;
/* number of window extra bytes */
...
...
@@ -151,17 +152,35 @@ DECL_HANDLER(create_class)
{
struct
window_class
*
class
;
struct
unicode_str
name
=
get_req_unicode_str
();
atom_t
atom
;
atom_t
atom
,
base_atom
;
if
(
name
.
len
)
{
atom
=
add_global_atom
(
NULL
,
&
name
);
if
(
!
atom
)
return
;
if
(
req
->
name_offset
&&
req
->
name_offset
<
name
.
len
/
sizeof
(
WCHAR
))
{
name
.
str
+=
req
->
name_offset
;
name
.
len
-=
req
->
name_offset
*
sizeof
(
WCHAR
);
base_atom
=
add_global_atom
(
NULL
,
&
name
);
if
(
!
base_atom
)
{
release_global_atom
(
NULL
,
atom
);
return
;
}
}
else
{
base_atom
=
atom
;
grab_global_atom
(
NULL
,
atom
);
}
}
else
{
atom
=
req
->
atom
;
base_atom
=
atom
=
req
->
atom
;
if
(
!
grab_global_atom
(
NULL
,
atom
))
return
;
grab_global_atom
(
NULL
,
base_atom
);
}
class
=
find_class
(
current
->
process
,
atom
,
req
->
instance
);
...
...
@@ -169,6 +188,7 @@ DECL_HANDLER(create_class)
{
set_win32_error
(
ERROR_CLASS_ALREADY_EXISTS
);
release_global_atom
(
NULL
,
atom
);
release_global_atom
(
NULL
,
base_atom
);
return
;
}
if
(
req
->
extra
<
0
||
req
->
extra
>
4096
||
req
->
win_extra
<
0
||
req
->
win_extra
>
4096
)
...
...
@@ -176,15 +196,18 @@ DECL_HANDLER(create_class)
/* don't allow stupid values here */
set_error
(
STATUS_INVALID_PARAMETER
);
release_global_atom
(
NULL
,
atom
);
release_global_atom
(
NULL
,
base_atom
);
return
;
}
if
(
!
(
class
=
create_class
(
current
->
process
,
req
->
extra
,
req
->
local
)))
{
release_global_atom
(
NULL
,
atom
);
release_global_atom
(
NULL
,
base_atom
);
return
;
}
class
->
atom
=
atom
;
class
->
base_atom
=
base_atom
;
class
->
instance
=
req
->
instance
;
class
->
style
=
req
->
style
;
class
->
win_extra
=
req
->
win_extra
;
...
...
server/protocol.def
View file @
e7243523
...
...
@@ -3149,6 +3149,7 @@ enum caret_state
int extra; /* number of extra class bytes */
int win_extra; /* number of window extra bytes */
client_ptr_t client_ptr; /* pointer to class in client address space */
data_size_t name_offset; /* base class name offset for specified atom */
VARARG(name,unicode_str); /* class name */
@REPLY
atom_t atom; /* resulting class atom */
...
...
server/request.h
View file @
e7243523
...
...
@@ -2036,7 +2036,8 @@ C_ASSERT( FIELD_OFFSET(struct create_class_request, instance) == 24 );
C_ASSERT
(
FIELD_OFFSET
(
struct
create_class_request
,
extra
)
==
32
);
C_ASSERT
(
FIELD_OFFSET
(
struct
create_class_request
,
win_extra
)
==
36
);
C_ASSERT
(
FIELD_OFFSET
(
struct
create_class_request
,
client_ptr
)
==
40
);
C_ASSERT
(
sizeof
(
struct
create_class_request
)
==
48
);
C_ASSERT
(
FIELD_OFFSET
(
struct
create_class_request
,
name_offset
)
==
48
);
C_ASSERT
(
sizeof
(
struct
create_class_request
)
==
56
);
C_ASSERT
(
FIELD_OFFSET
(
struct
create_class_reply
,
atom
)
==
8
);
C_ASSERT
(
sizeof
(
struct
create_class_reply
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
destroy_class_request
,
atom
)
==
12
);
...
...
server/trace.c
View file @
e7243523
...
...
@@ -3758,6 +3758,7 @@ static void dump_create_class_request( const struct create_class_request *req )
fprintf
(
stderr
,
", extra=%d"
,
req
->
extra
);
fprintf
(
stderr
,
", win_extra=%d"
,
req
->
win_extra
);
dump_uint64
(
", client_ptr="
,
&
req
->
client_ptr
);
fprintf
(
stderr
,
", name_offset=%u"
,
req
->
name_offset
);
dump_varargs_unicode_str
(
", name="
,
cur_size
);
}
...
...
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