X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=plugins%2Fmouse%2Fmouse.c;h=c9982c889e6072bc19b154594fd374d04b1649e3;hb=f3b42e60d8eb638d73c3d6aaa93196c283532b7e;hp=91ff7c4b18dd4ee358d44a42d67b4a0983584758;hpb=7d943a950e39d4d93113c0efc7b41916f6b8c66d;p=chaz%2Fopenbox diff --git a/plugins/mouse/mouse.c b/plugins/mouse/mouse.c index 91ff7c4b..c9982c88 100644 --- a/plugins/mouse/mouse.c +++ b/plugins/mouse/mouse.c @@ -31,6 +31,8 @@ static void parse_xml(xmlDocPtr doc, xmlNodePtr node, void *d) MouseAction mact; Action *action; + node = node->xmlChildrenNode; + if ((n = parse_find_node("dragThreshold", node))) threshold = parse_int(doc, n); if ((n = parse_find_node("doubleClickTime", node))) @@ -257,6 +259,7 @@ static void event(ObEvent *e, void *foo) { static Time ltime; static guint button = 0, state = 0, lbutton = 0; + static lwindow = None; static int px, py; gboolean click = FALSE; gboolean dclick = FALSE; @@ -309,13 +312,18 @@ static void event(ObEvent *e, void *foo) click = TRUE; /* double clicks happen if there were 2 in a row! */ if (lbutton == button && + lwindow == e->data.x.e->xbutton.window && e->data.x.e->xbutton.time - dclicktime <= ltime) { dclick = TRUE; lbutton = 0; - } else + } else { lbutton = button; - } else + lwindow = e->data.x.e->xbutton.window; + } + } else { lbutton = 0; + lwindow = None; + } button = 0; state = 0;