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
072698c9
Commit
072698c9
authored
Apr 04, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Store the display file descriptor directly in the server message queue.
Get rid of a few WaitForMultipleObjectsEx hacks.
parent
0cb29f47
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
22 deletions
+34
-22
message.c
dlls/user32/message.c
+1
-2
event.c
dlls/winex11.drv/event.c
+6
-12
x11drv.h
dlls/winex11.drv/x11drv.h
+0
-1
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+27
-7
No files found.
dlls/user32/message.c
View file @
072698c9
...
...
@@ -3188,13 +3188,12 @@ DWORD WINAPI MsgWaitForMultipleObjectsEx( DWORD count, CONST HANDLE *pHandles,
}
SERVER_END_REQ
;
/*
Add the thread event
to the handle list */
/*
add the queue
to the handle list */
for
(
i
=
0
;
i
<
count
;
i
++
)
handles
[
i
]
=
pHandles
[
i
];
handles
[
count
]
=
get_server_queue_handle
();
ReleaseThunkLock
(
&
lock
);
ret
=
USER_Driver
->
pMsgWaitForMultipleObjectsEx
(
count
+
1
,
handles
,
timeout
,
mask
,
flags
);
if
(
ret
==
count
+
1
)
ret
=
count
;
/* pretend the msg queue is ready */
if
(
lock
)
RestoreThunkLock
(
lock
);
return
ret
;
}
...
...
dlls/winex11.drv/event.c
View file @
072698c9
...
...
@@ -278,32 +278,26 @@ static int process_events( Display *display, ULONG_PTR mask )
DWORD
X11DRV_MsgWaitForMultipleObjectsEx
(
DWORD
count
,
const
HANDLE
*
handles
,
DWORD
timeout
,
DWORD
mask
,
DWORD
flags
)
{
DWORD
i
,
ret
;
DWORD
ret
;
struct
x11drv_thread_data
*
data
=
TlsGetValue
(
thread_data_tls_index
);
if
(
!
data
||
data
->
process_event_count
)
if
(
!
data
)
{
if
(
!
count
&&
!
timeout
)
return
WAIT_TIMEOUT
;
return
WaitForMultipleObjectsEx
(
count
,
handles
,
flags
&
MWMO_WAITALL
,
timeout
,
flags
&
MWMO_ALERTABLE
);
}
/* check whether only server queue handle was passed in */
if
(
count
<
2
)
flags
&=
~
MWMO_WAITALL
;
if
(
data
->
process_event_count
)
mask
=
0
;
/* don't process nested events */
data
->
process_event_count
++
;
if
(
process_events
(
data
->
display
,
mask
))
ret
=
count
;
if
(
process_events
(
data
->
display
,
mask
))
ret
=
count
-
1
;
else
if
(
count
||
timeout
)
{
HANDLE
new_handles
[
MAXIMUM_WAIT_OBJECTS
+
1
];
/* FIXME! */
for
(
i
=
0
;
i
<
count
;
i
++
)
new_handles
[
i
]
=
handles
[
i
];
new_handles
[
count
]
=
data
->
display_fd
;
ret
=
WaitForMultipleObjectsEx
(
count
+
1
,
new_handles
,
flags
&
MWMO_WAITALL
,
ret
=
WaitForMultipleObjectsEx
(
count
,
handles
,
flags
&
MWMO_WAITALL
,
timeout
,
flags
&
MWMO_ALERTABLE
);
if
(
ret
==
count
)
process_events
(
data
->
display
,
mask
);
if
(
ret
==
count
-
1
)
process_events
(
data
->
display
,
mask
);
}
else
ret
=
WAIT_TIMEOUT
;
...
...
dlls/winex11.drv/x11drv.h
View file @
072698c9
...
...
@@ -498,7 +498,6 @@ struct x11drv_escape_set_dce
struct
x11drv_thread_data
{
Display
*
display
;
HANDLE
display_fd
;
int
process_event_count
;
/* recursion count for event processing */
Cursor
cursor
;
/* current cursor */
Window
cursor_window
;
/* current window that contains the cursor */
...
...
dlls/winex11.drv/x11drv_main.c
View file @
072698c9
...
...
@@ -459,7 +459,6 @@ static void thread_detach(void)
if
(
data
)
{
X11DRV_ResetSelectionOwner
();
CloseHandle
(
data
->
display_fd
);
wine_tsx11_lock
();
if
(
data
->
xim
)
XCloseIM
(
data
->
xim
);
XCloseDisplay
(
data
->
display
);
...
...
@@ -489,6 +488,32 @@ static void process_detach(void)
}
/* store the display fd into the message queue */
static
void
set_queue_display_fd
(
Display
*
display
)
{
HANDLE
handle
;
int
ret
;
if
(
wine_server_fd_to_handle
(
ConnectionNumber
(
display
),
GENERIC_READ
|
SYNCHRONIZE
,
0
,
&
handle
))
{
MESSAGE
(
"x11drv: Can't allocate handle for display fd
\n
"
);
ExitProcess
(
1
);
}
SERVER_START_REQ
(
set_queue_fd
)
{
req
->
handle
=
handle
;
ret
=
wine_server_call
(
req
);
}
SERVER_END_REQ
;
if
(
ret
)
{
MESSAGE
(
"x11drv: Can't store handle for display fd
\n
"
);
ExitProcess
(
1
);
}
CloseHandle
(
handle
);
}
/***********************************************************************
* X11DRV thread initialisation routine
*/
...
...
@@ -535,12 +560,7 @@ struct x11drv_thread_data *x11drv_init_thread_data(void)
else
if
(
!
(
data
->
xim
=
X11DRV_SetupXIM
(
data
->
display
,
input_style
)))
WARN
(
"Input Method is not available
\n
"
);
if
(
wine_server_fd_to_handle
(
ConnectionNumber
(
data
->
display
),
GENERIC_READ
|
SYNCHRONIZE
,
0
,
&
data
->
display_fd
))
{
MESSAGE
(
"x11drv: Can't allocate handle for display fd
\n
"
);
ExitProcess
(
1
);
}
set_queue_display_fd
(
data
->
display
);
data
->
process_event_count
=
0
;
data
->
cursor
=
None
;
data
->
cursor_window
=
None
;
...
...
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