Support switching the keyboard layout with WINE running.

This commit is contained in:
Stephane Lussier 2000-04-16 17:07:27 +00:00 committed by Alexandre Julliard
parent 11dee2b151
commit fa8b7281cd
4 changed files with 32 additions and 1 deletions

View File

@ -106,6 +106,7 @@ extern int TSXQueryColor(Display*, Colormap, XColor*);
extern int TSXQueryKeymap(Display*, char*);
extern int TSXQueryPointer(Display*, Window, Window*, Window*, int*, int*, int*, int*, unsigned int*);
extern int TSXQueryTree(Display*, Window, Window*, Window*, Window**, unsigned int*);
extern int TSXRefreshKeyboardMapping(XMappingEvent*);
extern int TSXResetScreenSaver(Display*);
extern int TSXRestackWindows(Display*, Window*, int);
extern int TSXSendEvent(Display*, Window, int, long, XEvent*);

View File

@ -111,6 +111,7 @@ XQueryPointer
XQueryTree
XReconfigureWMWindow
XRectInRegion
XRefreshKeyboardMapping
XResetScreenSaver
XResourceManagerString
XRestackWindows

View File

@ -1005,6 +1005,17 @@ int TSXQueryTree(Display* a0, Window a1, Window* a2, Window* a3, Window** a4,
return r;
}
int TSXRefreshKeyboardMapping(XMappingEvent* a0)
{
int r;
TRACE("Call XRefreshKeyboardMapping\n");
EnterCriticalSection( &X11DRV_CritSection );
r = XRefreshKeyboardMapping(a0);
LeaveCriticalSection( &X11DRV_CritSection );
TRACE("Ret XRefreshKeyboardMapping\n");
return r;
}
int TSXResetScreenSaver(Display* a0)
{
int r;

View File

@ -110,6 +110,7 @@ static void EVENT_PropertyNotify( XPropertyEvent *event );
static void EVENT_ClientMessage( HWND hWnd, XClientMessageEvent *event );
static void EVENT_MapNotify( HWND pWnd, XMapEvent *event );
static void EVENT_UnmapNotify( HWND pWnd, XUnmapEvent *event );
static void EVENT_MappingNotify( XMappingEvent *event );
#ifdef HAVE_LIBXXSHM
static void EVENT_ShmCompletion( XShmCompletionEvent *event );
@ -323,7 +324,8 @@ static void EVENT_ProcessEvent( XEvent *event )
}
if ( !hWnd && event->xany.window != X11DRV_GetXRootWindow()
&& event->type != PropertyNotify )
&& event->type != PropertyNotify
&& event->type != MappingNotify)
ERR("Got event %s for unknown Window %08lx\n",
event_names[event->type], event->xany.window );
else
@ -462,6 +464,10 @@ static void EVENT_ProcessEvent( XEvent *event )
EVENT_UnmapNotify( hWnd, (XUnmapEvent *)event );
break;
case MappingNotify:
EVENT_MappingNotify( (XMappingEvent *) event );
break;
default:
WARN("Unprocessed event %s for hwnd %04x\n",
event_names[event->type], hWnd );
@ -1860,6 +1866,18 @@ void EVENT_UnmapNotify( HWND hWnd, XUnmapEvent *event )
WIN_ReleaseWndPtr(pWnd);
}
/***********************************************************************
* EVENT_MappingNotify
*/
static void EVENT_MappingNotify( XMappingEvent *event )
{
TSXRefreshKeyboardMapping(event);
/* reinitialize Wine-X11 driver keyboard table */
X11DRV_KEYBOARD_Init();
}
/**********************************************************************
* X11DRV_EVENT_SetInputMethod
*/