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
bd5d5e97
Commit
bd5d5e97
authored
Dec 12, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Start checking for driver events more often when the app doesn't consume messages properly.
parent
a283b986
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
1 deletion
+15
-1
message.c
dlls/user32/message.c
+12
-0
user_private.h
dlls/user32/user_private.h
+2
-1
winproc.c
dlls/user32/winproc.c
+1
-0
No files found.
dlls/user32/message.c
View file @
bd5d5e97
...
...
@@ -3671,6 +3671,16 @@ void WINAPI PostQuitMessage( INT exit_code )
SERVER_END_REQ
;
}
/* check for driver events if we detect that the app is not properly consuming messages */
static
inline
void
check_for_driver_events
(
void
)
{
if
(
get_user_thread_info
()
->
message_count
>
200
)
{
flush_window_surfaces
(
FALSE
);
USER_Driver
->
pMsgWaitForMultipleObjectsEx
(
0
,
NULL
,
0
,
QS_ALLINPUT
,
0
);
}
else
get_user_thread_info
()
->
message_count
++
;
}
/***********************************************************************
* PeekMessageW (USER32.@)
...
...
@@ -3680,6 +3690,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH PeekMessageW( MSG *msg_out, HWND hwnd, UINT first,
MSG
msg
;
USER_CheckNotLock
();
check_for_driver_events
();
if
(
!
peek_message
(
&
msg
,
hwnd
,
first
,
last
,
flags
,
0
))
{
...
...
@@ -3726,6 +3737,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetMessageW( MSG *msg, HWND hwnd, UINT first, UINT
unsigned
int
mask
=
QS_POSTMESSAGE
|
QS_SENDMESSAGE
;
/* Always selected */
USER_CheckNotLock
();
check_for_driver_events
();
if
(
first
||
last
)
{
...
...
dlls/user32/user_private.h
View file @
bd5d5e97
...
...
@@ -172,7 +172,8 @@ struct wm_char_mapping_data
struct
user_thread_info
{
HANDLE
server_queue
;
/* Handle to server-side queue */
DWORD
recursion_count
;
/* SendMessage recursion counter */
WORD
recursion_count
;
/* SendMessage recursion counter */
WORD
message_count
;
/* Get/PeekMessage loop counter */
BOOL
hook_unicode
;
/* Is current hook unicode? */
HHOOK
hook
;
/* Current hook */
struct
received_message_info
*
receive_info
;
/* Message being currently received */
...
...
dlls/user32/winproc.c
View file @
bd5d5e97
...
...
@@ -1126,6 +1126,7 @@ static DWORD wait_message( DWORD count, CONST HANDLE *handles, DWORD timeout, DW
{
DWORD
ret
=
USER_Driver
->
pMsgWaitForMultipleObjectsEx
(
count
,
handles
,
timeout
,
mask
,
flags
);
if
(
ret
==
WAIT_TIMEOUT
&&
!
count
&&
!
timeout
)
NtYieldExecution
();
if
((
mask
&
QS_INPUT
)
==
QS_INPUT
)
get_user_thread_info
()
->
message_count
=
0
;
return
ret
;
}
...
...
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