Commit cb283d4a authored by Ulrich Sibiller's avatar Ulrich Sibiller

Keyboard.c: code simplification / scope improvements

parent 58415b56
...@@ -312,10 +312,7 @@ void nxagentChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl *ctrl) ...@@ -312,10 +312,7 @@ void nxagentChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl *ctrl)
fprintf(stderr, "%s: WARNING! Propagating changes to keyboard settings.\n", __func__); fprintf(stderr, "%s: WARNING! Propagating changes to keyboard settings.\n", __func__);
#endif #endif
unsigned long value_mask = KBKeyClickPercent | unsigned long value_mask = KBKeyClickPercent | KBBellPercent | KBBellPitch | KBBellDuration;
KBBellPercent |
KBBellPitch |
KBBellDuration;
XKeyboardControl values = { XKeyboardControl values = {
.key_click_percent = ctrl->click, .key_click_percent = ctrl->click,
...@@ -429,7 +426,6 @@ N/A ...@@ -429,7 +426,6 @@ N/A
min_keycode, min_keycode,
max_keycode - min_keycode + 1, max_keycode - min_keycode + 1,
&mapWidth); &mapWidth);
if (keymap64 == NULL) if (keymap64 == NULL)
{ {
XFreeModifiermap(modifier_keymap); XFreeModifiermap(modifier_keymap);
...@@ -867,7 +863,6 @@ void nxagentNotifyKeyboardChanges(int oldMinKeycode, int oldMaxKeycode) ...@@ -867,7 +863,6 @@ void nxagentNotifyKeyboardChanges(int oldMinKeycode, int oldMaxKeycode)
#endif #endif
xEvent event = {0}; xEvent event = {0};
event.u.u.type = MappingNotify; event.u.u.type = MappingNotify;
event.u.mappingNotify.request = MappingKeyboard; event.u.mappingNotify.request = MappingKeyboard;
event.u.mappingNotify.firstKeyCode = inputInfo.keyboard -> key -> curKeySyms.minKeyCode; event.u.mappingNotify.firstKeyCode = inputInfo.keyboard -> key -> curKeySyms.minKeyCode;
...@@ -940,12 +935,11 @@ int nxagentResetKeyboard(void) ...@@ -940,12 +935,11 @@ int nxagentResetKeyboard(void)
} }
#endif #endif
dev->key=NULL; dev->key = NULL;
} }
dev->focus=NULL; dev->focus = NULL;
dev->kbdfeed = NULL;
dev->kbdfeed=NULL;
#ifdef XKB #ifdef XKB
nxagentTuneXkbWrapper(); nxagentTuneXkbWrapper();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment