X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Factions.cc;h=36b4f111acb72ddf7133115ce61411c7cede0c0d;hb=88a8bc413b433dc7196c17f4e318ae920ae7d1e6;hp=9659b2f0cebfa03a3e89bfee0ef22bc95c1beba8;hpb=04494f100baac2df9785d05d3487d6193f8545fe;p=chaz%2Fopenbox diff --git a/src/actions.cc b/src/actions.cc index 9659b2f0..36b4f111 100644 --- a/src/actions.cc +++ b/src/actions.cc @@ -145,7 +145,8 @@ void Actions::buttonReleaseHandler(const XButtonEvent &e) data.action = MouseAction::Click; openbox->bindings()->fireButton(&data); - long dblclick = openbox->screen(screen)->config().double_click_delay; + long dblclick = 0; + python_get_long("double_click_delay", &dblclick); if (e.time - _release.time < (unsigned)dblclick && _release.win == e.window && _release.button == e.button) { @@ -289,8 +290,8 @@ void Actions::motionHandler(const XMotionEvent &e) // compress changes to a window into a single change XEvent ce; while (XCheckTypedWindowEvent(**otk::display, e.window, e.type, &ce)) { - x_root = e.x_root; - y_root = e.y_root; + x_root = ce.x_root; + y_root = ce.y_root; } int screen; @@ -303,7 +304,8 @@ void Actions::motionHandler(const XMotionEvent &e) if (!_dragging) { int dx = x_root - _press.pos.x(); int dy = y_root - _press.pos.y(); - long threshold = openbox->screen(screen)->config().drag_threshold; + long threshold = 0; + python_get_long("drag_threshold", &threshold); if (!(std::abs(dx) >= threshold || std::abs(dy) >= threshold)) return; // not at the threshold yet }