Signed-off-by: Rémi Bernon rbernon@codeweavers.com ---
This supersedes 203899-203901 in a sense that they will conflict with the patches. The previous series was anyway not doing much and I intend to resend the surface patches later, making all user32 tests pass with null driver progressively.
As a starting point, this series makes all the user32 input tests pass with null graphics driver.
dlls/user32/driver.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/dlls/user32/driver.c b/dlls/user32/driver.c index 7ac77141696..8060baa5df1 100644 --- a/dlls/user32/driver.c +++ b/dlls/user32/driver.c @@ -35,6 +35,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(user); WINE_DECLARE_DEBUG_CHANNEL(winediag); +WINE_DECLARE_DEBUG_CHANNEL(keyboard);
static USER_DRIVER null_driver, lazy_load_driver;
@@ -187,9 +188,12 @@ void USER_unload_driver(void) * These are fallbacks for entry points that are not implemented in the real driver. */
+static HKL nulldrv_keyboard_layout = (HKL)MAKELONG(MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT), MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT)); + static HKL CDECL nulldrv_ActivateKeyboardLayout( HKL layout, UINT flags ) { - return 0; + TRACE_(keyboard)( "layout %p, flags %x.\n", layout, flags ); + return nulldrv_keyboard_layout; }
static void CDECL nulldrv_Beep(void) @@ -260,17 +264,24 @@ static INT CDECL nulldrv_GetKeyNameText( LONG lparam, LPWSTR buffer, INT size )
static HKL CDECL nulldrv_GetKeyboardLayout( DWORD thread_id ) { - return 0; + TRACE_(keyboard)( "thread_id %u.\n", thread_id ); + return nulldrv_keyboard_layout; }
static BOOL CDECL nulldrv_GetKeyboardLayoutName( LPWSTR name ) { - return FALSE; + DWORD layout; + TRACE_(keyboard)( "name %p.\n", name ); + layout = HandleToUlong( nulldrv_keyboard_layout ); + if (HIWORD(layout) == LOWORD(layout)) layout = LOWORD(layout); + swprintf( name, KL_NAMELENGTH, L"%08x", layout ); + return TRUE; }
static HKL CDECL nulldrv_LoadKeyboardLayout( LPCWSTR name, UINT flags ) { - return 0; + TRACE_(keyboard)( "name %s, flags %x.\n", debugstr_w(name), flags ); + return nulldrv_keyboard_layout; }
static UINT CDECL nulldrv_MapVirtualKeyEx( UINT code, UINT type, HKL layout )