X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=plugins%2Fmouse%2Fmouse.c;h=4ed7b9dda22a05d93b75fdd7e65bcfbd761e77eb;hb=e4be1f860bc579fd4a0d9dee6a6ca590030a791e;hp=1afc43e65cf2f0f12b1689c5c775056b60d21472;hpb=ae0d84721d58731feee4888b67e7a1e55cd318b2;p=chaz%2Fopenbox diff --git a/plugins/mouse/mouse.c b/plugins/mouse/mouse.c index 1afc43e6..4ed7b9dd 100644 --- a/plugins/mouse/mouse.c +++ b/plugins/mouse/mouse.c @@ -13,7 +13,6 @@ static int threshold; static int dclicktime; -gboolean mouse_lefthand; /* @@ -36,8 +35,6 @@ static void parse_xml(xmlDocPtr doc, xmlNodePtr node, void *d) threshold = parse_int(doc, n); if ((n = parse_find_node("doubleClickTime", node))) dclicktime = parse_int(doc, n); - if ((n = parse_find_node("leftHanded", node))) - mouse_lefthand = parse_bool(doc, n); n = parse_find_node("context", node); while (n) { @@ -101,14 +98,13 @@ void plugin_setup_config() { threshold = 3; dclicktime = 200; - mouse_lefthand = FALSE; parse_register("mouse", parse_xml, NULL); } /* Array of GSList*s of PointerBinding*s. */ static GSList *bound_contexts[NUM_CONTEXTS]; -static void grab_for_client(Client *client, gboolean grab) +static void grab_for_client(ObClient *client, gboolean grab) { int i; GSList *it; @@ -171,7 +167,7 @@ static void clearall() } } -static void fire_button(MouseAction a, Context context, Client *c, guint state, +static void fire_button(MouseAction a, Context context, ObClient *c, guint state, guint button, int x, int y) { GSList *it; @@ -202,7 +198,7 @@ static void fire_button(MouseAction a, Context context, Client *c, guint state, } } -static void fire_motion(MouseAction a, Context context, Client *c, +static void fire_motion(MouseAction a, Context context, ObClient *c, guint state, guint button, int x_root, int y_root, guint32 corner) { @@ -278,12 +274,10 @@ static void event(ObEvent *e, void *foo) context = frame_context(e->data.x.client, e->data.x.e->xbutton.window); - if (!button) { - px = e->data.x.e->xbutton.x_root; - py = e->data.x.e->xbutton.y_root; - button = e->data.x.e->xbutton.button; - state = e->data.x.e->xbutton.state; - } + px = e->data.x.e->xbutton.x_root; + py = e->data.x.e->xbutton.y_root; + button = e->data.x.e->xbutton.button; + state = e->data.x.e->xbutton.state; fire_button(MouseAction_Press, context, e->data.x.client, e->data.x.e->xbutton.state,