Skip to content

Commit

Permalink
Disable Xinput by default (#1920)
Browse files Browse the repository at this point in the history
* Disable Xinput by default

Causes performance issues for a lot of people.
See #1886.
  • Loading branch information
Caellian authored May 17, 2024
1 parent c635df8 commit 256ffbd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cmake/ConkyBuildOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
20 changes: 10 additions & 10 deletions src/display-x11.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
}
Expand Down

0 comments on commit 256ffbd

Please sign in to comment.