Fix Unknown keycode name & IO error

This commit is contained in:
vCaesar 2016-11-02 00:39:33 +08:00
parent e87c3f799e
commit dfdf01af08
2 changed files with 7 additions and 3 deletions

View File

@ -1874,9 +1874,9 @@ void load_input_helper(Display *disp) {
} else } else
#endif #endif
if (strncmp(layout_name, prefix_xfree86, strlen(prefix_xfree86)) != 0) { if (strncmp(layout_name, prefix_xfree86, strlen(prefix_xfree86)) != 0) {
logger(LOG_LEVEL_ERROR, // logger(LOG_LEVEL_ERROR,
"%s [%u]: Unknown keycode name '%s', please file a bug report!\n", // "%s [%u]: Unknown keycode name '%s', please file a bug report!\n",
__FUNCTION__, __LINE__, layout_name); // __FUNCTION__, __LINE__, layout_name);
} }
else if (layout_name == NULL) { else if (layout_name == NULL) {
logger(LOG_LEVEL_ERROR, logger(LOG_LEVEL_ERROR,

View File

@ -1098,6 +1098,10 @@ UIOHOOK_API int hook_stop() {
// https://bugs.freedesktop.org/show_bug.cgi?id=42356#c4 // https://bugs.freedesktop.org/show_bug.cgi?id=42356#c4
//XFlush(hook->ctrl.display); //XFlush(hook->ctrl.display);
XSync(hook->ctrl.display, False); XSync(hook->ctrl.display, False);
if (hook->ctrl.display) {
XCloseDisplay(hook->ctrl.display);
hook->ctrl.display = NULL;
}
status = UIOHOOK_SUCCESS; status = UIOHOOK_SUCCESS;
} }