1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-06-02 07:20:47 +00:00

Disable Xinput by default (#1920)

* Disable Xinput by default

Causes performance issues for a lot of people.
See #1886.
This commit is contained in:
Tin Švagelj 2024-05-17 15:09:38 +02:00 committed by GitHub
parent c635df8689
commit 256ffbd75a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 11 deletions

View File

@ -197,7 +197,7 @@ dependent_option(BUILD_IMLIB2 "Enable Imlib2 support" true
dependent_option(BUILD_XSHAPE "Enable Xshape support" true
"BUILD_X11" false
"Xshape support requires X11")
dependent_option(BUILD_XINPUT "Build Xinput 2 support" true
dependent_option(BUILD_XINPUT "Build Xinput 2 support (slow)" false
"BUILD_X11" false
"Xinput 2 support requires X11")

View File

@ -572,14 +572,14 @@ bool handle_event<x_event_handler::MOUSE_INPUT>(
if (ev.xbutton.button >= 4 &&
ev.xbutton.button <= 7) { // scroll "buttons"
scroll_direction_t direction = x11_scroll_direction(ev.xbutton.button);
*consumed = llua_mouse_hook(
mouse_scroll_event(ev.xbutton.x, ev.xbutton.y, ev.xbutton.x_root,
ev.xbutton.y_root, direction, mods));
*consumed = llua_mouse_hook(mouse_scroll_event(
vec2i(ev.xbutton.x, ev.xbutton.y),
vec2i(ev.xbutton.x_root, ev.xbutton.y_root), direction, mods));
} else {
mouse_button_t button = x11_mouse_button_code(ev.xbutton.button);
*consumed = llua_mouse_hook(mouse_button_event(
mouse_event_t::PRESS, ev.xbutton.x, ev.xbutton.y, ev.xbutton.x_root,
ev.xbutton.y_root, button, mods));
mouse_event_t::PRESS, vec2i(ev.xbutton.x, ev.xbutton.y),
vec2i(ev.xbutton.x_root, ev.xbutton.y_root), button, mods));
}
break;
}
@ -590,15 +590,15 @@ bool handle_event<x_event_handler::MOUSE_INPUT>(
modifier_state_t mods = x11_modifier_state(ev.xbutton.state);
mouse_button_t button = x11_mouse_button_code(ev.xbutton.button);
*consumed = llua_mouse_hook(mouse_button_event(
mouse_event_t::RELEASE, ev.xbutton.x, ev.xbutton.y, ev.xbutton.x_root,
ev.xbutton.y_root, button, mods));
mouse_event_t::RELEASE, vec2i(ev.xbutton.x, ev.xbutton.y),
vec2i(ev.xbutton.x_root, ev.xbutton.y_root), button, mods));
break;
}
case MotionNotify: {
modifier_state_t mods = x11_modifier_state(ev.xmotion.state);
*consumed = llua_mouse_hook(mouse_move_event(ev.xmotion.x, ev.xmotion.y,
ev.xmotion.x_root,
ev.xmotion.y_root, mods));
*consumed = llua_mouse_hook(
mouse_move_event(vec2i(ev.xmotion.x, ev.xmotion.y),
vec2i(ev.xmotion.x_root, ev.xmotion.y_root), mods));
break;
}
}