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
2896540a
Commit
2896540a
authored
Aug 29, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Set the queue mask directly in get_message to avoid an extra server call.
parent
b4edb573
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
26 deletions
+18
-26
message.c
dlls/user32/message.c
+8
-24
server_protocol.h
include/wine/server_protocol.h
+3
-1
protocol.def
server/protocol.def
+2
-0
queue.c
server/queue.c
+2
-0
trace.c
server/trace.c
+3
-1
No files found.
dlls/user32/message.c
View file @
2896540a
...
...
@@ -2017,9 +2017,12 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags
ULONG_PTR
extra_info
=
0
;
struct
user_thread_info
*
thread_info
=
get_user_thread_info
();
struct
received_message_info
info
,
*
old_info
;
unsigned
int
wake_mask
,
changed_mask
=
HIWORD
(
flags
);
unsigned
int
hw_id
=
0
;
/* id of previous hardware message */
if
(
!
first
&&
!
last
)
last
=
~
0
;
if
(
!
changed_mask
)
changed_mask
=
QS_ALLINPUT
;
wake_mask
=
changed_mask
&
(
QS_SENDMESSAGE
|
QS_SMRESULT
);
for
(;;)
{
...
...
@@ -2038,6 +2041,8 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags
req
->
get_first
=
first
;
req
->
get_last
=
last
;
req
->
hw_id
=
hw_id
;
req
->
wake_mask
=
wake_mask
;
req
->
changed_mask
=
changed_mask
;
if
(
buffer_size
)
wine_server_set_reply
(
req
,
buffer
,
buffer_size
);
if
(
!
(
res
=
wine_server_call
(
req
)))
{
...
...
@@ -2933,35 +2938,14 @@ BOOL WINAPI GetMessageW( MSG *msg, HWND hwnd, UINT first, UINT last )
if
((
first
<=
WM_SYSTIMER
)
&&
(
last
>=
WM_SYSTIMER
))
mask
|=
QS_TIMER
;
if
((
first
<=
WM_PAINT
)
&&
(
last
>=
WM_PAINT
))
mask
|=
QS_PAINT
;
}
else
mask
|=
QS_MOUSE
|
QS_KEY
|
QS_TIMER
|
QS_PAIN
T
;
else
mask
=
QS_ALLINPU
T
;
while
(
!
PeekMessageW
(
msg
,
hwnd
,
first
,
last
,
PM_REMOVE
))
while
(
!
PeekMessageW
(
msg
,
hwnd
,
first
,
last
,
PM_REMOVE
|
PM_NOYIELD
|
(
mask
<<
16
)
))
{
/* wait until one of the bits is set */
unsigned
int
wake_bits
=
0
,
changed_bits
=
0
;
DWORD
dwlc
;
SERVER_START_REQ
(
set_queue_mask
)
{
req
->
wake_mask
=
QS_SENDMESSAGE
;
req
->
changed_mask
=
mask
;
req
->
skip_wait
=
1
;
if
(
!
wine_server_call
(
req
))
{
wake_bits
=
reply
->
wake_bits
;
changed_bits
=
reply
->
changed_bits
;
}
}
SERVER_END_REQ
;
if
(
changed_bits
&
mask
)
continue
;
if
(
wake_bits
&
QS_SENDMESSAGE
)
continue
;
TRACE
(
"(%04x) mask=%08x, bits=%08x, changed=%08x, waiting
\n
"
,
GetCurrentThreadId
(),
mask
,
wake_bits
,
changed_bits
);
ReleaseThunkLock
(
&
dwlc
);
USER_Driver
->
pMsgWaitForMultipleObjectsEx
(
1
,
&
server_queue
,
INFINITE
,
QS_ALLINPUT
,
0
);
USER_Driver
->
pMsgWaitForMultipleObjectsEx
(
1
,
&
server_queue
,
INFINITE
,
mask
,
0
);
if
(
dwlc
)
RestoreThunkLock
(
dwlc
);
}
...
...
include/wine/server_protocol.h
View file @
2896540a
...
...
@@ -2499,6 +2499,8 @@ struct get_message_request
unsigned
int
get_first
;
unsigned
int
get_last
;
unsigned
int
hw_id
;
unsigned
int
wake_mask
;
unsigned
int
changed_mask
;
};
struct
get_message_reply
{
...
...
@@ -4731,6 +4733,6 @@ union generic_reply
struct
make_process_system_reply
make_process_system_reply
;
};
#define SERVER_PROTOCOL_VERSION 31
1
#define SERVER_PROTOCOL_VERSION 31
2
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/protocol.def
View file @
2896540a
...
...
@@ -1859,6 +1859,8 @@ enum message_type
unsigned int get_first; /* first message code to get */
unsigned int get_last; /* last message code to get */
unsigned int hw_id; /* id of the previous hardware message (or 0) */
unsigned int wake_mask; /* wakeup bits mask */
unsigned int changed_mask; /* changed bits mask */
@REPLY
user_handle_t win; /* window handle */
int type; /* message type */
...
...
server/queue.c
View file @
2896540a
...
...
@@ -1828,6 +1828,8 @@ DECL_HANDLER(get_message)
return
;
}
queue
->
wake_mask
=
req
->
wake_mask
;
queue
->
changed_mask
=
req
->
changed_mask
;
set_error
(
STATUS_PENDING
);
/* FIXME */
}
...
...
server/trace.c
View file @
2896540a
...
...
@@ -2304,7 +2304,9 @@ static void dump_get_message_request( const struct get_message_request *req )
fprintf
(
stderr
,
" get_win=%p,"
,
req
->
get_win
);
fprintf
(
stderr
,
" get_first=%08x,"
,
req
->
get_first
);
fprintf
(
stderr
,
" get_last=%08x,"
,
req
->
get_last
);
fprintf
(
stderr
,
" hw_id=%08x"
,
req
->
hw_id
);
fprintf
(
stderr
,
" hw_id=%08x,"
,
req
->
hw_id
);
fprintf
(
stderr
,
" wake_mask=%08x,"
,
req
->
wake_mask
);
fprintf
(
stderr
,
" changed_mask=%08x"
,
req
->
changed_mask
);
}
static
void
dump_get_message_reply
(
const
struct
get_message_reply
*
req
)
...
...
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