Skip to content

Commit 256ffbd

Browse files
authored
Disable Xinput by default (#1920)
* Disable Xinput by default Causes performance issues for a lot of people. See #1886.
1 parent c635df8 commit 256ffbd

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

cmake/ConkyBuildOptions.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ dependent_option(BUILD_IMLIB2 "Enable Imlib2 support" true
197197
dependent_option(BUILD_XSHAPE "Enable Xshape support" true
198198
"BUILD_X11" false
199199
"Xshape support requires X11")
200-
dependent_option(BUILD_XINPUT "Build Xinput 2 support" true
200+
dependent_option(BUILD_XINPUT "Build Xinput 2 support (slow)" false
201201
"BUILD_X11" false
202202
"Xinput 2 support requires X11")
203203

src/display-x11.cc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -572,14 +572,14 @@ bool handle_event<x_event_handler::MOUSE_INPUT>(
572572
if (ev.xbutton.button >= 4 &&
573573
ev.xbutton.button <= 7) { // scroll "buttons"
574574
scroll_direction_t direction = x11_scroll_direction(ev.xbutton.button);
575-
*consumed = llua_mouse_hook(
576-
mouse_scroll_event(ev.xbutton.x, ev.xbutton.y, ev.xbutton.x_root,
577-
ev.xbutton.y_root, direction, mods));
575+
*consumed = llua_mouse_hook(mouse_scroll_event(
576+
vec2i(ev.xbutton.x, ev.xbutton.y),
577+
vec2i(ev.xbutton.x_root, ev.xbutton.y_root), direction, mods));
578578
} else {
579579
mouse_button_t button = x11_mouse_button_code(ev.xbutton.button);
580580
*consumed = llua_mouse_hook(mouse_button_event(
581-
mouse_event_t::PRESS, ev.xbutton.x, ev.xbutton.y, ev.xbutton.x_root,
582-
ev.xbutton.y_root, button, mods));
581+
mouse_event_t::PRESS, vec2i(ev.xbutton.x, ev.xbutton.y),
582+
vec2i(ev.xbutton.x_root, ev.xbutton.y_root), button, mods));
583583
}
584584
break;
585585
}
@@ -590,15 +590,15 @@ bool handle_event<x_event_handler::MOUSE_INPUT>(
590590
modifier_state_t mods = x11_modifier_state(ev.xbutton.state);
591591
mouse_button_t button = x11_mouse_button_code(ev.xbutton.button);
592592
*consumed = llua_mouse_hook(mouse_button_event(
593-
mouse_event_t::RELEASE, ev.xbutton.x, ev.xbutton.y, ev.xbutton.x_root,
594-
ev.xbutton.y_root, button, mods));
593+
mouse_event_t::RELEASE, vec2i(ev.xbutton.x, ev.xbutton.y),
594+
vec2i(ev.xbutton.x_root, ev.xbutton.y_root), button, mods));
595595
break;
596596
}
597597
case MotionNotify: {
598598
modifier_state_t mods = x11_modifier_state(ev.xmotion.state);
599-
*consumed = llua_mouse_hook(mouse_move_event(ev.xmotion.x, ev.xmotion.y,
600-
ev.xmotion.x_root,
601-
ev.xmotion.y_root, mods));
599+
*consumed = llua_mouse_hook(
600+
mouse_move_event(vec2i(ev.xmotion.x, ev.xmotion.y),
601+
vec2i(ev.xmotion.x_root, ev.xmotion.y_root), mods));
602602
break;
603603
}
604604
}

0 commit comments

Comments
 (0)