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
86af38c8
Commit
86af38c8
authored
Jul 07, 2005
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jul 07, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make IsWindowUnicode work in the case when window belongs to another
process.
parent
62dbe211
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
9 deletions
+50
-9
win.c
dlls/user/win.c
+36
-7
server_protocol.h
include/wine/server_protocol.h
+4
-1
protocol.def
server/protocol.def
+3
-0
trace.c
server/trace.c
+3
-1
window.c
server/window.c
+4
-0
No files found.
dlls/user/win.c
View file @
86af38c8
...
...
@@ -1056,10 +1056,11 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
SERVER_START_REQ
(
set_window_info
)
{
req
->
handle
=
hwnd
;
req
->
flags
=
SET_WIN_STYLE
|
SET_WIN_EXSTYLE
|
SET_WIN_INSTANCE
;
req
->
flags
=
SET_WIN_STYLE
|
SET_WIN_EXSTYLE
|
SET_WIN_INSTANCE
|
SET_WIN_UNICODE
;
req
->
style
=
wndPtr
->
dwStyle
;
req
->
ex_style
=
wndPtr
->
dwExStyle
;
req
->
instance
=
(
void
*
)
wndPtr
->
hInstance
;
req
->
is_unicode
=
(
type
==
WIN_PROC_32W
);
req
->
extra_offset
=
-
1
;
wine_server_call
(
req
);
}
...
...
@@ -1658,12 +1659,26 @@ BOOL WINAPI IsWindowEnabled(HWND hWnd)
BOOL
WINAPI
IsWindowUnicode
(
HWND
hwnd
)
{
WND
*
wndPtr
;
BOOL
retvalue
;
BOOL
retvalue
=
FALSE
;
if
(
!
(
wndPtr
=
WIN_GetPtr
(
hwnd
)))
return
FALSE
;
if
(
!
(
wndPtr
=
WIN_GetPtr
(
hwnd
))
||
wndPtr
==
WND_OTHER_PROCESS
)
return
FALSE
;
if
(
wndPtr
==
WND_DESKTOP
)
return
TRUE
;
retvalue
=
(
WINPROC_GetProcType
(
wndPtr
->
winproc
)
==
WIN_PROC_32W
);
WIN_ReleasePtr
(
wndPtr
);
if
(
wndPtr
!=
WND_OTHER_PROCESS
)
{
retvalue
=
(
WINPROC_GetProcType
(
wndPtr
->
winproc
)
==
WIN_PROC_32W
);
WIN_ReleasePtr
(
wndPtr
);
}
else
{
SERVER_START_REQ
(
get_window_info
)
{
req
->
handle
=
hwnd
;
if
(
!
wine_server_call_err
(
req
))
retvalue
=
reply
->
is_unicode
;
}
SERVER_END_REQ
;
}
return
retvalue
;
}
...
...
@@ -1976,10 +1991,18 @@ static LONG_PTR WIN_SetWindowLong( HWND hwnd, INT offset, LONG_PTR newval,
return
(
ULONG_PTR
)
SetParent
(
hwnd
,
(
HWND
)
newval
);
}
case
GWLP_WNDPROC
:
{
WINDOWPROCTYPE
old_type
=
WINPROC_GetProcType
(
wndPtr
->
winproc
);
retval
=
(
ULONG_PTR
)
WINPROC_GetProc
(
wndPtr
->
winproc
,
type
);
wndPtr
->
winproc
=
WINPROC_AllocProc
(
(
WNDPROC
)
newval
,
type
);
WIN_ReleasePtr
(
wndPtr
);
return
retval
;
if
(
old_type
==
type
)
{
WIN_ReleasePtr
(
wndPtr
);
return
retval
;
}
/* update is_unicode flag on the server side */
break
;
}
case
GWLP_ID
:
case
GWLP_HINSTANCE
:
case
GWLP_USERDATA
:
...
...
@@ -2036,6 +2059,10 @@ static LONG_PTR WIN_SetWindowLong( HWND hwnd, INT offset, LONG_PTR newval,
req
->
flags
=
SET_WIN_INSTANCE
;
req
->
instance
=
(
void
*
)
newval
;
break
;
case
GWLP_WNDPROC
:
req
->
flags
=
SET_WIN_UNICODE
;
req
->
is_unicode
=
(
type
==
WIN_PROC_32W
);
break
;
case
GWLP_USERDATA
:
req
->
flags
=
SET_WIN_USERDATA
;
req
->
user_data
=
(
void
*
)
newval
;
...
...
@@ -2066,6 +2093,8 @@ static LONG_PTR WIN_SetWindowLong( HWND hwnd, INT offset, LONG_PTR newval,
wndPtr
->
hInstance
=
(
HINSTANCE
)
newval
;
retval
=
(
ULONG_PTR
)
reply
->
old_instance
;
break
;
case
GWLP_WNDPROC
:
break
;
case
GWLP_USERDATA
:
wndPtr
->
userdata
=
newval
;
retval
=
(
ULONG_PTR
)
reply
->
old_user_data
;
...
...
include/wine/server_protocol.h
View file @
86af38c8
...
...
@@ -2531,6 +2531,7 @@ struct get_window_info_reply
process_id_t
pid
;
thread_id_t
tid
;
atom_t
atom
;
int
is_unicode
;
};
...
...
@@ -2544,6 +2545,7 @@ struct set_window_info_request
unsigned
int
ex_style
;
unsigned
int
id
;
void
*
instance
;
int
is_unicode
;
void
*
user_data
;
int
extra_offset
;
size_t
extra_size
;
...
...
@@ -2565,6 +2567,7 @@ struct set_window_info_reply
#define SET_WIN_INSTANCE 0x08
#define SET_WIN_USERDATA 0x10
#define SET_WIN_EXTRA 0x20
#define SET_WIN_UNICODE 0x40
...
...
@@ -4188,6 +4191,6 @@ union generic_reply
struct
set_mailslot_info_reply
set_mailslot_info_reply
;
};
#define SERVER_PROTOCOL_VERSION 1
79
#define SERVER_PROTOCOL_VERSION 1
80
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/protocol.def
View file @
86af38c8
...
...
@@ -1788,6 +1788,7 @@ enum message_type
process_id_t pid; /* process owning the window */
thread_id_t tid; /* thread owning the window */
atom_t atom; /* class atom */
int is_unicode; /* ANSI or unicode */
@END
...
...
@@ -1799,6 +1800,7 @@ enum message_type
unsigned int ex_style; /* window extended style */
unsigned int id; /* window id */
void* instance; /* creator instance */
int is_unicode; /* ANSI or unicode */
void* user_data; /* user-specific data */
int extra_offset; /* offset to set in extra bytes */
size_t extra_size; /* size to set in extra bytes */
...
...
@@ -1817,6 +1819,7 @@ enum message_type
#define SET_WIN_INSTANCE 0x08
#define SET_WIN_USERDATA 0x10
#define SET_WIN_EXTRA 0x20
#define SET_WIN_UNICODE 0x40
/* Set the parent of a window */
...
...
server/trace.c
View file @
86af38c8
...
...
@@ -2249,7 +2249,8 @@ static void dump_get_window_info_reply( const struct get_window_info_reply *req
fprintf
(
stderr
,
" last_active=%p,"
,
req
->
last_active
);
fprintf
(
stderr
,
" pid=%04x,"
,
req
->
pid
);
fprintf
(
stderr
,
" tid=%04x,"
,
req
->
tid
);
fprintf
(
stderr
,
" atom=%04x"
,
req
->
atom
);
fprintf
(
stderr
,
" atom=%04x,"
,
req
->
atom
);
fprintf
(
stderr
,
" is_unicode=%d"
,
req
->
is_unicode
);
}
static
void
dump_set_window_info_request
(
const
struct
set_window_info_request
*
req
)
...
...
@@ -2260,6 +2261,7 @@ static void dump_set_window_info_request( const struct set_window_info_request *
fprintf
(
stderr
,
" ex_style=%08x,"
,
req
->
ex_style
);
fprintf
(
stderr
,
" id=%08x,"
,
req
->
id
);
fprintf
(
stderr
,
" instance=%p,"
,
req
->
instance
);
fprintf
(
stderr
,
" is_unicode=%d,"
,
req
->
is_unicode
);
fprintf
(
stderr
,
" user_data=%p,"
,
req
->
user_data
);
fprintf
(
stderr
,
" extra_offset=%d,"
,
req
->
extra_offset
);
fprintf
(
stderr
,
" extra_size=%d,"
,
req
->
extra_size
);
...
...
server/window.c
View file @
86af38c8
...
...
@@ -73,6 +73,7 @@ struct window
unsigned
int
ex_style
;
/* window extended style */
unsigned
int
id
;
/* window id */
void
*
instance
;
/* creator instance */
int
is_unicode
;
/* ANSI or unicode */
void
*
user_data
;
/* user-specific data */
WCHAR
*
text
;
/* window caption text */
unsigned
int
paint_flags
;
/* various painting flags */
...
...
@@ -354,6 +355,7 @@ static struct window *create_window( struct window *parent, struct window *owner
win
->
ex_style
=
0
;
win
->
id
=
0
;
win
->
instance
=
NULL
;
win
->
is_unicode
=
1
;
win
->
user_data
=
NULL
;
win
->
text
=
NULL
;
win
->
paint_flags
=
0
;
...
...
@@ -1393,6 +1395,7 @@ DECL_HANDLER(get_window_info)
{
reply
->
full_handle
=
win
->
handle
;
reply
->
last_active
=
win
->
handle
;
reply
->
is_unicode
=
win
->
is_unicode
;
if
(
get_user_object
(
win
->
last_active
,
USER_WINDOW
))
reply
->
last_active
=
win
->
last_active
;
if
(
win
->
thread
)
{
...
...
@@ -1440,6 +1443,7 @@ DECL_HANDLER(set_window_info)
if
(
req
->
flags
&
SET_WIN_EXSTYLE
)
win
->
ex_style
=
req
->
ex_style
;
if
(
req
->
flags
&
SET_WIN_ID
)
win
->
id
=
req
->
id
;
if
(
req
->
flags
&
SET_WIN_INSTANCE
)
win
->
instance
=
req
->
instance
;
if
(
req
->
flags
&
SET_WIN_UNICODE
)
win
->
is_unicode
=
req
->
is_unicode
;
if
(
req
->
flags
&
SET_WIN_USERDATA
)
win
->
user_data
=
req
->
user_data
;
if
(
req
->
flags
&
SET_WIN_EXTRA
)
memcpy
(
win
->
extra_bytes
+
req
->
extra_offset
,
&
req
->
extra_value
,
req
->
extra_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