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
5977c723
Commit
5977c723
authored
Mar 13, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Store a pointer to the X11 event currently being handled instead of a simple count.
parent
36ac341b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
15 deletions
+10
-15
event.c
dlls/winex11.drv/event.c
+7
-4
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-1
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+2
-10
No files found.
dlls/winex11.drv/event.c
View file @
5977c723
...
...
@@ -291,6 +291,8 @@ static inline void call_event_handler( Display *display, XEvent *event )
{
HWND
hwnd
;
x11drv_event_handler
handler
;
XEvent
*
prev
;
struct
x11drv_thread_data
*
thread_data
;
if
(
!
(
handler
=
find_handler
(
event
->
type
)))
{
...
...
@@ -305,7 +307,11 @@ static inline void call_event_handler( Display *display, XEvent *event )
TRACE
(
"%s for hwnd/window %p/%lx
\n
"
,
dbgstr_event
(
event
->
type
),
hwnd
,
event
->
xany
.
window
);
wine_tsx11_unlock
();
thread_data
=
x11drv_thread_data
();
prev
=
thread_data
->
current_event
;
thread_data
->
current_event
=
event
;
handler
(
hwnd
,
event
);
thread_data
->
current_event
=
prev
;
wine_tsx11_lock
();
}
...
...
@@ -364,9 +370,7 @@ DWORD X11DRV_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles,
timeout
,
flags
&
MWMO_ALERTABLE
);
}
if
(
data
->
process_event_count
)
mask
=
0
;
/* don't process nested events */
data
->
process_event_count
++
;
if
(
data
->
current_event
)
mask
=
0
;
/* don't process nested events */
if
(
process_events
(
data
->
display
,
filter_event
,
mask
))
ret
=
count
-
1
;
else
if
(
count
||
timeout
)
...
...
@@ -377,7 +381,6 @@ DWORD X11DRV_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles,
}
else
ret
=
WAIT_TIMEOUT
;
data
->
process_event_count
--
;
return
ret
;
}
...
...
dlls/winex11.drv/x11drv.h
View file @
5977c723
...
...
@@ -499,7 +499,7 @@ struct x11drv_escape_set_drawable
struct
x11drv_thread_data
{
Display
*
display
;
int
process_event_count
;
/* recursion count for event processing
*/
XEvent
*
current_event
;
/* event currently being processed
*/
Cursor
cursor
;
/* current cursor */
Window
cursor_window
;
/* current window that contains the cursor */
Window
grab_window
;
/* window that currently grabs the mouse */
...
...
dlls/winex11.drv/x11drv_main.c
View file @
5977c723
...
...
@@ -617,7 +617,7 @@ struct x11drv_thread_data *x11drv_init_thread_data(void)
{
struct
x11drv_thread_data
*
data
;
if
(
!
(
data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
data
)
)))
if
(
!
(
data
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
data
)
)))
{
ERR
(
"could not create data
\n
"
);
ExitProcess
(
1
);
...
...
@@ -651,18 +651,10 @@ struct x11drv_thread_data *x11drv_init_thread_data(void)
if
(
TRACE_ON
(
synchronous
))
XSynchronize
(
data
->
display
,
True
);
wine_tsx11_unlock
();
if
(
!
use_xim
)
data
->
xim
=
NULL
;
else
if
(
!
(
data
->
xim
=
X11DRV_SetupXIM
(
data
->
display
,
input_style
)))
if
(
use_xim
&&
!
(
data
->
xim
=
X11DRV_SetupXIM
(
data
->
display
,
input_style
)))
WARN
(
"Input Method is not available
\n
"
);
set_queue_display_fd
(
data
->
display
);
data
->
process_event_count
=
0
;
data
->
cursor
=
None
;
data
->
cursor_window
=
None
;
data
->
grab_window
=
None
;
data
->
last_focus
=
0
;
data
->
selection_wnd
=
0
;
TlsSetValue
(
thread_data_tls_index
,
data
);
X11DRV_SetCursor
(
NULL
);
return
data
;
...
...
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