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
d7641074
Commit
d7641074
authored
Dec 08, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Make user handles ints instead of pointers.
parent
ad4605fc
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
16 additions
and
16 deletions
+16
-16
server_protocol.h
include/wine/server_protocol.h
+1
-1
clipboard.c
server/clipboard.c
+1
-1
protocol.def
server/protocol.def
+1
-1
queue.c
server/queue.c
+4
-4
sock.c
server/sock.c
+1
-1
trace.c
server/trace.c
+0
-0
user.c
server/user.c
+6
-6
window.c
server/window.c
+1
-1
make_requests
tools/make_requests
+1
-1
No files found.
include/wine/server_protocol.h
View file @
d7641074
...
...
@@ -16,7 +16,7 @@
#include <winbase.h>
typedef
unsigned
int
obj_handle_t
;
typedef
void
*
user_handle_t
;
typedef
unsigned
int
user_handle_t
;
typedef
unsigned
short
atom_t
;
typedef
unsigned
int
process_id_t
;
typedef
unsigned
int
thread_id_t
;
...
...
server/clipboard.c
View file @
d7641074
...
...
@@ -76,7 +76,7 @@ static void clipboard_dump( struct object *obj, int verbose )
{
struct
clipboard
*
clipboard
=
(
struct
clipboard
*
)
obj
;
fprintf
(
stderr
,
"Clipboard open_thread=%p open_win=%
p owner_thread=%p owner_win=%p viewer=%p
seq=%u
\n
"
,
fprintf
(
stderr
,
"Clipboard open_thread=%p open_win=%
08x owner_thread=%p owner_win=%08x viewer=%08x
seq=%u
\n
"
,
clipboard
->
open_thread
,
clipboard
->
open_win
,
clipboard
->
owner_thread
,
clipboard
->
owner_win
,
clipboard
->
viewer
,
clipboard
->
seqno
);
}
...
...
server/protocol.def
View file @
d7641074
...
...
@@ -32,7 +32,7 @@
#include <winbase.h>
typedef unsigned int obj_handle_t;
typedef
void *
user_handle_t;
typedef
unsigned int
user_handle_t;
typedef unsigned short atom_t;
typedef unsigned int process_id_t;
typedef unsigned int thread_id_t;
...
...
server/queue.c
View file @
d7641074
...
...
@@ -709,7 +709,7 @@ static int get_quit_message( struct msg_queue *queue, unsigned int flags,
{
reply
->
total
=
0
;
reply
->
type
=
MSG_POSTED
;
reply
->
win
=
NULL
;
reply
->
win
=
0
;
reply
->
msg
=
WM_QUIT
;
reply
->
wparam
=
queue
->
exit_code
;
reply
->
lparam
=
0
;
...
...
@@ -889,7 +889,7 @@ static void msg_queue_poll_event( struct fd *fd, int event )
static
void
thread_input_dump
(
struct
object
*
obj
,
int
verbose
)
{
struct
thread_input
*
input
=
(
struct
thread_input
*
)
obj
;
fprintf
(
stderr
,
"Thread input focus=%
p capture=%p active=%p
\n
"
,
fprintf
(
stderr
,
"Thread input focus=%
08x capture=%08x active=%08x
\n
"
,
input
->
focus
,
input
->
capture
,
input
->
active
);
}
...
...
@@ -1545,7 +1545,7 @@ void post_win_event( struct thread *thread, unsigned int event,
msg
->
data_size
=
sizeof
(
*
data
)
+
module_size
;
if
(
debug_level
>
1
)
fprintf
(
stderr
,
"post_win_event: tid %04x event %04x win %
p
object_id %d child_id %d
\n
"
,
fprintf
(
stderr
,
"post_win_event: tid %04x event %04x win %
08x
object_id %d child_id %d
\n
"
,
get_thread_id
(
thread
),
event
,
win
,
object_id
,
child_id
);
list_add_tail
(
&
thread
->
queue
->
msg_list
[
SEND_MESSAGE
],
&
msg
->
entry
);
set_queue_bits
(
thread
->
queue
,
QS_SENDMESSAGE
);
...
...
@@ -1950,7 +1950,7 @@ DECL_HANDLER(set_win_timer)
{
queue
=
get_current_queue
();
/* look for a timer with this id */
if
(
id
&&
(
timer
=
find_timer
(
queue
,
NULL
,
req
->
msg
,
id
)))
if
(
id
&&
(
timer
=
find_timer
(
queue
,
0
,
req
->
msg
,
id
)))
{
/* free and reuse id */
free_timer
(
queue
,
timer
);
...
...
server/sock.c
View file @
d7641074
...
...
@@ -272,7 +272,7 @@ static void sock_wake_up( struct sock *sock, int pollev )
}
if
(
sock
->
window
)
{
if
(
debug_level
)
fprintf
(
stderr
,
"signalling events %x win %
p
\n
"
,
events
,
sock
->
window
);
if
(
debug_level
)
fprintf
(
stderr
,
"signalling events %x win %
08x
\n
"
,
events
,
sock
->
window
);
for
(
i
=
0
;
i
<
FD_MAX_EVENTS
;
i
++
)
{
int
event
=
event_bitorder
[
i
];
...
...
server/trace.c
View file @
d7641074
This diff is collapsed.
Click to expand it.
server/user.c
View file @
d7641074
...
...
@@ -36,10 +36,10 @@ static int allocated_handles;
static
struct
user_handle
*
handle_to_entry
(
user_handle_t
handle
)
{
unsigned
short
generation
;
int
index
=
((
(
unsigned
long
)
handle
&
0xffff
)
-
FIRST_USER_HANDLE
)
>>
1
;
int
index
=
((
handle
&
0xffff
)
-
FIRST_USER_HANDLE
)
>>
1
;
if
(
index
<
0
||
index
>=
nb_handles
)
return
NULL
;
if
(
!
handles
[
index
].
type
)
return
NULL
;
generation
=
(
unsigned
long
)
handle
>>
16
;
generation
=
handle
>>
16
;
if
(
generation
==
handles
[
index
].
generation
||
!
generation
||
generation
==
0xffff
)
return
&
handles
[
index
];
return
NULL
;
...
...
@@ -47,8 +47,8 @@ static struct user_handle *handle_to_entry( user_handle_t handle )
static
inline
user_handle_t
entry_to_handle
(
struct
user_handle
*
ptr
)
{
int
index
=
ptr
-
handles
;
return
(
user_handle_t
)((((
unsigned
long
)
index
<<
1
)
+
FIRST_USER_HANDLE
)
+
(
ptr
->
generation
<<
16
)
);
unsigned
int
index
=
ptr
-
handles
;
return
(
index
<<
1
)
+
FIRST_USER_HANDLE
+
(
ptr
->
generation
<<
16
);
}
static
inline
struct
user_handle
*
alloc_user_entry
(
void
)
...
...
@@ -113,7 +113,7 @@ user_handle_t get_user_full_handle( user_handle_t handle )
{
struct
user_handle
*
entry
;
if
(
(
unsigned
long
)
handle
>>
16
)
return
handle
;
if
(
handle
>>
16
)
return
handle
;
if
(
!
(
entry
=
handle_to_entry
(
handle
)))
return
handle
;
return
entry_to_handle
(
entry
);
}
...
...
@@ -149,7 +149,7 @@ void *next_user_handle( user_handle_t *handle, enum user_object type )
if
(
!*
handle
)
entry
=
handles
;
else
{
int
index
=
((
(
unsigned
long
)
*
handle
&
0xffff
)
-
FIRST_USER_HANDLE
)
>>
1
;
int
index
=
((
*
handle
&
0xffff
)
-
FIRST_USER_HANDLE
)
>>
1
;
if
(
index
<
0
||
index
>=
nb_handles
)
return
NULL
;
entry
=
handles
+
index
+
1
;
/* start from the next one */
}
...
...
server/window.c
View file @
d7641074
...
...
@@ -2031,7 +2031,7 @@ DECL_HANDLER(set_window_pos)
if
(
!
(
flags
&
SWP_NOZORDER
))
{
switch
((
int
)
(
unsigned
long
)
req
->
previous
)
switch
((
int
)
req
->
previous
)
{
case
0
:
/* HWND_TOP */
previous
=
WINPTR_TOP
;
...
...
tools/make_requests
View file @
d7641074
...
...
@@ -35,7 +35,7 @@ my %formats =
"data_size_t"
=>
"%u"
,
"obj_handle_t"
=>
"%04x"
,
"atom_t"
=>
"%04x"
,
"user_handle_t"
=>
"%
p
"
,
"user_handle_t"
=>
"%
08x
"
,
"process_id_t"
=>
"%04x"
,
"thread_id_t"
=>
"%04x"
,
"timeout_t"
=>
"&dump_timeout"
,
...
...
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