When using desktop mode attach all thread inputs together, so that

keyboard focus works properly.
This commit is contained in:
Alexandre Julliard 2003-01-28 00:34:07 +00:00
parent 73fd10c866
commit 49a013cdd3
3 changed files with 5 additions and 1 deletions

View File

@ -91,7 +91,8 @@ static DWORD CALLBACK desktop_thread( LPVOID driver_data )
*/
void X11DRV_create_desktop_thread(void)
{
HANDLE handle = CreateThread( NULL, 0, desktop_thread, NtCurrentTeb()->driver_data, 0, NULL );
HANDLE handle = CreateThread( NULL, 0, desktop_thread, NtCurrentTeb()->driver_data,
0, &desktop_tid );
if (!handle)
{
MESSAGE( "Could not create desktop thread\n" );

View File

@ -57,6 +57,7 @@ unsigned int screen_width;
unsigned int screen_height;
unsigned int screen_depth;
Window root_window;
DWORD desktop_tid = 0;
int dxgrab, usedga, usexvidmode;
int use_take_focus = 1;
int managed_mode = 1;
@ -439,6 +440,7 @@ struct x11drv_thread_data *x11drv_init_thread_data(void)
data->cursor_window = None;
data->last_focus = 0;
NtCurrentTeb()->driver_data = data;
if (desktop_tid) AttachThreadInput( GetCurrentThreadId(), desktop_tid, TRUE );
return data;
}

View File

@ -353,6 +353,7 @@ inline static Display *thread_display(void) { return x11drv_thread_data()->displ
extern Visual *visual;
extern Window root_window;
extern DWORD desktop_tid;
extern unsigned int screen_width;
extern unsigned int screen_height;
extern unsigned int screen_depth;