When using desktop mode attach all thread inputs together, so that
keyboard focus works properly.
This commit is contained in:
parent
73fd10c866
commit
49a013cdd3
|
@ -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" );
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue