X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fmouse.c;h=dca6e6baf6604c9ead3dd2e577a4b04b638b6f5f;hb=5563e251c36a1fbda703cf4bc3c8c6ae543829bd;hp=493e1000c1eb546674053154896504cfae599935;hpb=fbc7607fbd1a380428a53094e727ac7631871bd4;p=chaz%2Fopenbox diff --git a/openbox/mouse.c b/openbox/mouse.c index 493e1000..dca6e6ba 100644 --- a/openbox/mouse.c +++ b/openbox/mouse.c @@ -19,16 +19,15 @@ #include "openbox.h" #include "config.h" -#include "xerror.h" #include "actions.h" #include "event.h" #include "client.h" -#include "prop.h" #include "grab.h" #include "frame.h" #include "translate.h" #include "mouse.h" #include "gettext.h" +#include "obt/display.h" #include @@ -142,21 +141,21 @@ static void grab_all_clients(gboolean grab) mouse_grab_for_client(it->data, grab); } -void mouse_unbind_all() +void mouse_unbind_all(void) { gint i; GSList *it; - + for(i = 0; i < OB_FRAME_NUM_CONTEXTS; ++i) { for (it = bound_contexts[i]; it; it = g_slist_next(it)) { ObMouseBinding *b = it->data; gint j; for (j = 0; j < OB_NUM_MOUSE_ACTIONS; ++j) { - GSList *it; + GSList *jt; - for (it = b->actions[j]; it; it = g_slist_next(it)) - actions_act_unref(it->data); + for (jt = b->actions[j]; jt; jt = g_slist_next(jt)) + actions_act_unref(jt->data); g_slist_free(b->actions[j]); } g_free(b); @@ -196,7 +195,7 @@ static gboolean fire_binding(ObMouseAction a, ObFrameContext context, if (it == NULL) return FALSE; actions_run_acts(b->actions[a], mouse_action_to_user_action(a), - state, x, y, context, c); + state, x, y, button, context, c); return TRUE; } @@ -237,7 +236,7 @@ void mouse_event(ObClient *client, XEvent *e) if (CLIENT_CONTEXT(context, client)) { /* Replay the event, so it goes to the client*/ - XAllowEvents(ob_display, ReplayPointer, event_curtime); + XAllowEvents(obt_display, ReplayPointer, event_curtime); /* Fall through to the release case! */ } else break; @@ -257,10 +256,10 @@ void mouse_event(ObClient *client, XEvent *e) Window wjunk; guint ujunk, b, w, h; /* this can cause errors to occur when the window closes */ - xerror_set_ignore(TRUE); - junk1 = XGetGeometry(ob_display, e->xbutton.window, + obt_display_ignore_errors(TRUE); + junk1 = XGetGeometry(obt_display, e->xbutton.window, &wjunk, &junk1, &junk2, &w, &h, &b, &ujunk); - xerror_set_ignore(FALSE); + obt_display_ignore_errors(FALSE); if (junk1) { if (e->xbutton.x >= (signed)-b && e->xbutton.y >= (signed)-b &&