diff --git a/dlls/ttydrv/ttydrv.spec b/dlls/ttydrv/ttydrv.spec index f5c5b2b9541..55ad8bcdbc3 100644 --- a/dlls/ttydrv/ttydrv.spec +++ b/dlls/ttydrv/ttydrv.spec @@ -17,8 +17,6 @@ debug_channels (ttydrv) @ cdecl MapVirtualKey(long long) TTYDRV_MapVirtualKey @ cdecl GetKeyNameText(long str long) TTYDRV_GetKeyNameText @ cdecl ToUnicode(long long ptr ptr long long) TTYDRV_ToUnicode -@ cdecl GetBeepActive() TTYDRV_GetBeepActive -@ cdecl SetBeepActive(long) TTYDRV_SetBeepActive @ cdecl Beep() TTYDRV_Beep @ cdecl GetDIState(long ptr) TTYDRV_GetDIState @ cdecl GetDIData(ptr long ptr ptr long) TTYDRV_GetDIData diff --git a/dlls/ttydrv/user.c b/dlls/ttydrv/user.c index b129f0b4149..ca7a3c5d9dd 100644 --- a/dlls/ttydrv/user.c +++ b/dlls/ttydrv/user.c @@ -63,21 +63,6 @@ INT TTYDRV_ToUnicode( UINT virtKey, UINT scanCode, LPBYTE lpKeyState, return 0; } -/*********************************************************************** - * TTYDRV_GetBeepActive - */ -BOOL TTYDRV_GetBeepActive(void) -{ - return FALSE; -} - -/*********************************************************************** - * TTYDRV_SetBeepActive - */ -void TTYDRV_SetBeepActive(BOOL bActivate) -{ -} - /*********************************************************************** * TTYDRV_Beep */ diff --git a/dlls/user/user_main.c b/dlls/user/user_main.c index 6e358a37eac..aa8be710a22 100644 --- a/dlls/user/user_main.c +++ b/dlls/user/user_main.c @@ -64,8 +64,6 @@ static BOOL load_driver(void) GET_USER_FUNC(MapVirtualKey); GET_USER_FUNC(GetKeyNameText); GET_USER_FUNC(ToUnicode); - GET_USER_FUNC(GetBeepActive); - GET_USER_FUNC(SetBeepActive); GET_USER_FUNC(Beep); GET_USER_FUNC(GetDIState); GET_USER_FUNC(GetDIData); diff --git a/dlls/x11drv/x11drv.spec b/dlls/x11drv/x11drv.spec index f8bad5e20d4..391278541b5 100644 --- a/dlls/x11drv/x11drv.spec +++ b/dlls/x11drv/x11drv.spec @@ -17,8 +17,6 @@ debug_channels (bitblt bitmap clipboard cursor dinput event font gdi graphics @ cdecl MapVirtualKey(long long) X11DRV_MapVirtualKey @ cdecl GetKeyNameText(long str long) X11DRV_GetKeyNameText @ cdecl ToUnicode(long long ptr ptr long long) X11DRV_ToUnicode -@ cdecl GetBeepActive() X11DRV_GetBeepActive -@ cdecl SetBeepActive(long) X11DRV_SetBeepActive @ cdecl Beep() X11DRV_Beep @ cdecl GetDIState(long ptr) X11DRV_GetDIState @ cdecl GetDIData(ptr long ptr ptr long) X11DRV_GetDIData diff --git a/dlls/x11drv/x11drv_main.c b/dlls/x11drv/x11drv_main.c index 631f801efab..32daccf3dee 100644 --- a/dlls/x11drv/x11drv_main.c +++ b/dlls/x11drv/x11drv_main.c @@ -43,7 +43,6 @@ static int *ph_errno = &h_errno; DEFAULT_DEBUG_CHANNEL(x11drv); -static XKeyboardState keyboard_state; static void (*old_tsx11_lock)(void); static void (*old_tsx11_unlock)(void); @@ -420,9 +419,6 @@ static void process_attach(void) ExitProcess(1); } - /* save keyboard setup */ - TSXGetKeyboardControl(display, &keyboard_state); - /* initialize event handling */ X11DRV_EVENT_Init(); @@ -449,18 +445,6 @@ static void process_attach(void) */ static void process_detach(void) { - /* restore keyboard setup */ - XKeyboardControl keyboard_value; - - keyboard_value.key_click_percent = keyboard_state.key_click_percent; - keyboard_value.bell_percent = keyboard_state.bell_percent; - keyboard_value.bell_pitch = keyboard_state.bell_pitch; - keyboard_value.bell_duration = keyboard_state.bell_duration; - keyboard_value.auto_repeat_mode = keyboard_state.global_auto_repeat; - - TSXChangeKeyboardControl(display, KBKeyClickPercent | KBBellPercent | - KBBellPitch | KBBellDuration | KBAutoRepeatMode, &keyboard_value); - #ifdef HAVE_OPENGL /* cleanup GLX */ /*X11DRV_GLX_Cleanup();*/ diff --git a/include/keyboard.h b/include/keyboard.h index 1f1bc5b92d3..5714c748063 100644 --- a/include/keyboard.h +++ b/include/keyboard.h @@ -29,9 +29,6 @@ VOID WINAPI KEYBOARD_Disable(VOID); /* Wine internals */ -extern BOOL KEYBOARD_GetBeepActive(void); -extern void KEYBOARD_SetBeepActive(BOOL bActivate); - extern void KEYBOARD_SendEvent(BYTE bVk, BYTE bScan, DWORD dwFlags, DWORD posX, DWORD posY, DWORD time); #define WINE_KEYBDEVENT_MAGIC ( ('K'<<24)|('E'<<16)|('Y'<<8)|'B' ) diff --git a/include/user.h b/include/user.h index df0b9069d61..85f4ad3a149 100644 --- a/include/user.h +++ b/include/user.h @@ -46,8 +46,6 @@ typedef struct tagUSER_DRIVER { UINT16 (*pMapVirtualKey)(UINT16, UINT16); INT16 (*pGetKeyNameText)(LONG, LPSTR, INT16); INT (*pToUnicode)(UINT, UINT, LPBYTE, LPWSTR, int, UINT); - BOOL (*pGetBeepActive)(void); - void (*pSetBeepActive)(BOOL); void (*pBeep)(void); BOOL (*pGetDIState)(DWORD, LPVOID); BOOL (*pGetDIData)(BYTE *, DWORD, struct DIDEVICEOBJECTDATA *, LPDWORD, DWORD); diff --git a/windows/keyboard.c b/windows/keyboard.c index e90ff1b6294..dd331c0dd7e 100644 --- a/windows/keyboard.c +++ b/windows/keyboard.c @@ -258,22 +258,6 @@ INT16 WINAPI ToAscii16(UINT16 virtKey,UINT16 scanCode, LPBYTE lpKeyState, return ToAscii( virtKey, scanCode, lpKeyState, lpChar, flags ); } -/*********************************************************************** - * KEYBOARD_GetBeepActive - */ -BOOL KEYBOARD_GetBeepActive() -{ - return USER_Driver.pGetBeepActive(); -} - -/*********************************************************************** - * KEYBOARD_SetBeepActive - */ -void KEYBOARD_SetBeepActive(BOOL bActivate) -{ - USER_Driver.pSetBeepActive(bActivate); -} - /*********************************************************************** * MessageBeep (USER.104) */ @@ -287,6 +271,8 @@ void WINAPI MessageBeep16( UINT16 i ) */ BOOL WINAPI MessageBeep( UINT i ) { - USER_Driver.pBeep(); + BOOL active = TRUE; + SystemParametersInfoA( SPI_GETBEEP, 0, &active, FALSE ); + if (active) USER_Driver.pBeep(); return TRUE; } diff --git a/windows/sysparams.c b/windows/sysparams.c index e82eff9cc71..382b8e1cc01 100644 --- a/windows/sysparams.c +++ b/windows/sysparams.c @@ -23,6 +23,8 @@ DEFAULT_DEBUG_CHANNEL(system); +static BOOL beep_active = TRUE; + /*********************************************************************** * GetTimerResolution (USER.14) */ @@ -137,10 +139,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam, switch (uiAction) { case SPI_GETBEEP: /* 1 */ - *(BOOL *)pvParam = KEYBOARD_GetBeepActive(); + *(BOOL *)pvParam = beep_active; break; case SPI_SETBEEP: /* 2 */ - KEYBOARD_SetBeepActive( uiParam ); + beep_active = uiParam; break; WINE_SPI_FIXME(SPI_GETMOUSE); /* 3 */ diff --git a/windows/x11drv/keyboard.c b/windows/x11drv/keyboard.c index 65271ffce7f..f9a18bb9764 100644 --- a/windows/x11drv/keyboard.c +++ b/windows/x11drv/keyboard.c @@ -1623,33 +1623,6 @@ INT X11DRV_ToUnicode(UINT virtKey, UINT scanCode, LPBYTE lpKeyState, return ret; } -/*********************************************************************** - * GetBeepActive (X11DRV.@) - */ -BOOL X11DRV_GetBeepActive(void) -{ - XKeyboardState keyboard_state; - - TSXGetKeyboardControl(display, &keyboard_state); - - return keyboard_state.bell_percent != 0; -} - -/*********************************************************************** - * SetBeepActive (X11DRV.@) - */ -void X11DRV_SetBeepActive(BOOL bActivate) -{ - XKeyboardControl keyboard_value; - - if(bActivate) - keyboard_value.bell_percent = -1; - else - keyboard_value.bell_percent = 0; - - TSXChangeKeyboardControl(display, KBBellPercent, &keyboard_value); -} - /*********************************************************************** * Beep (X11DRV.@) */