From e71cf9c53ac77fa07a725fe870c3b2a32af35e78 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 5 Aug 2024 10:40:43 +0200 Subject: [PATCH] Xnest: replace XChangeKeyboardControl() by xcb_change_keyboard_control() Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xnest/Keyboard.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/hw/xnest/Keyboard.c b/hw/xnest/Keyboard.c index 1509a1116..0d5629350 100644 --- a/hw/xnest/Keyboard.c +++ b/hw/xnest/Keyboard.c @@ -62,21 +62,20 @@ xnestChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl * ctrl) { #if 0 unsigned long value_mask; - XKeyboardControl values; int i; value_mask = KBKeyClickPercent | KBBellPercent | KBBellPitch | KBBellDuration | KBAutoRepeatMode; - values.key_click_percent = ctrl->click; - values.bell_percent = ctrl->bell; - values.bell_pitch = ctrl->bell_pitch; - values.bell_duration = ctrl->bell_duration; - values.auto_repeat_mode = ctrl->autoRepeat ? - AutoRepeatModeOn : AutoRepeatModeOff; - - XChangeKeyboardControl(xnestDisplay, value_mask, &values); + xcb_params_keyboard_t values = { + .key_click_percent = ctrl->click, + .bell_percent = ctrl->bell, + .bell_pitch = ctrl->bell_pitch, + .bell_duration = ctrl->bell_duration, + .auto_repeat_mode = ctrl->autoRepeat ? AutoRepeatModeOn : AutoRepeatModeOff, + }; + xcb_aux_change_keyboard_control(xnestUpstreamInfo.conn, value_mask, &values); /* value_mask = KBKey | KBAutoRepeatMode; At this point, we need to walk through the vector and compare it @@ -88,7 +87,8 @@ xnestChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl * ctrl) values.led = i; values.led_mode = (ctrl->leds & (1 << (i - 1))) ? LedModeOn : LedModeOff; - XChangeKeyboardControl(xnestDisplay, value_mask, &values); + + xcb_aux_change_keyboard_control(xnestUpstreamInfo.conn, value_mask, &values); } #endif }