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
5beccd01
Commit
5beccd01
authored
Mar 08, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Take into account the event mask passed to MsgWaitForMultipleObjectsEx
to allow processing only a subset of the available X events.
parent
72d63737
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
6 deletions
+38
-6
event.c
dlls/x11drv/event.c
+38
-6
No files found.
dlls/x11drv/event.c
View file @
5beccd01
...
...
@@ -198,19 +198,51 @@ done:
/***********************************************************************
* filter_event
*/
static
Bool
filter_event
(
Display
*
display
,
XEvent
*
event
,
char
*
arg
)
{
DWORD
mask
=
(
ULONG_PTR
)
arg
;
if
((
mask
&
QS_ALLINPUT
)
==
QS_ALLINPUT
)
return
1
;
switch
(
event
->
type
)
{
case
KeyPress
:
case
KeyRelease
:
case
KeymapNotify
:
return
(
mask
&
QS_KEY
)
!=
0
;
case
ButtonPress
:
case
ButtonRelease
:
return
(
mask
&
QS_MOUSEBUTTON
)
!=
0
;
case
MotionNotify
:
case
EnterNotify
:
case
LeaveNotify
:
return
(
mask
&
QS_MOUSEMOVE
)
!=
0
;
case
Expose
:
return
(
mask
&
QS_PAINT
)
!=
0
;
case
ClientMessage
:
return
(
mask
&
QS_POSTMESSAGE
)
!=
0
;
default:
return
(
mask
&
QS_SENDMESSAGE
)
!=
0
;
}
}
/***********************************************************************
* process_events
*/
static
int
process_events
(
Display
*
display
)
static
int
process_events
(
Display
*
display
,
DWORD
mask
)
{
XEvent
event
;
HWND
hwnd
;
int
count
;
int
count
=
0
;
x11drv_event_handler
handler
;
wine_tsx11_lock
();
for
(
count
=
0
;
XPending
(
display
);
count
++
)
while
(
XCheckIfEvent
(
display
,
&
event
,
filter_event
,
(
char
*
)
mask
)
)
{
XNextEvent
(
display
,
&
event
)
;
count
++
;
if
(
XFilterEvent
(
&
event
,
None
))
continue
;
/* filtered, ignore it */
if
(
!
(
handler
=
find_handler
(
event
.
type
)))
...
...
@@ -261,12 +293,12 @@ DWORD X11DRV_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles,
wine_tsx11_unlock
();
data
->
process_event_count
++
;
if
(
process_events
(
data
->
display
))
ret
=
count
;
if
(
process_events
(
data
->
display
,
mask
))
ret
=
count
;
else
{
ret
=
WaitForMultipleObjectsEx
(
count
+
1
,
new_handles
,
flags
&
MWMO_WAITALL
,
timeout
,
flags
&
MWMO_ALERTABLE
);
if
(
ret
==
count
)
process_events
(
data
->
display
);
if
(
ret
==
count
)
process_events
(
data
->
display
,
mask
);
}
data
->
process_event_count
--
;
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