X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fmouse.c;h=15d77ae68f3e9ce062592b2df792eaec86b6f60f;hb=5d4cbbc67444c3955f705b3aeddf29be1c731866;hp=3872b83d7e79189e4e8fc0da0ed85381b19bf071;hpb=533992f5aae6804eb77b90f70bf032a09a373930;p=chaz%2Fopenbox diff --git a/openbox/mouse.c b/openbox/mouse.c index 3872b83d..15d77ae6 100644 --- a/openbox/mouse.c +++ b/openbox/mouse.c @@ -19,7 +19,7 @@ typedef struct { } ObMouseBinding; #define CLIENT_CONTEXT(co, cl) ((cl && cl->type == OB_CLIENT_TYPE_DESKTOP) ? \ - co == OB_FRAME_CONTEXT_ROOT : \ + co == OB_FRAME_CONTEXT_DESKTOP : \ co == OB_FRAME_CONTEXT_CLIENT) /* Array of GSList*s of PointerBinding*s. */ @@ -115,21 +115,9 @@ static gboolean fire_button(ObMouseAction a, ObFrameContext context, act->data.showmenu.y = y; } - if (act->func == action_desktop_dir) - { - act->data.desktopdir.final = FALSE; - act->data.desktopdir.cancel = FALSE; - } - if (act->func == action_send_to_desktop_dir) - { - act->data.sendtodir.final = FALSE; - act->data.sendtodir.cancel = FALSE; - } - - if (config_desktop_popup && - (act->func == action_desktop_dir || - act->func == action_send_to_desktop_dir)) - { + if (act->data.any.interactive) { + act->data.inter.cancel = FALSE; + act->data.inter.final = FALSE; keyboard_interactive_grab(state, c, context, act); } @@ -203,7 +191,7 @@ void mouse_event(ObClient *client, ObFrameContext context, XEvent *e) static int px, py; gboolean click = FALSE; gboolean dclick = FALSE; - + switch (e->type) { case ButtonPress: px = e->xbutton.x_root; @@ -229,12 +217,11 @@ void mouse_event(ObClient *client, ObFrameContext context, XEvent *e) int junk1, junk2; Window wjunk; guint ujunk, b, w, h; - Status s; xerror_set_ignore(TRUE); - s = XGetGeometry(ob_display, e->xbutton.window, - &wjunk, &junk1, &junk2, &w, &h, &b, &ujunk); + junk1 = XGetGeometry(ob_display, e->xbutton.window, + &wjunk, &junk1, &junk2, &w, &h, &b, &ujunk); xerror_set_ignore(FALSE); - if (s == Success) { + if (junk1) { if (e->xbutton.x >= (signed)-b && e->xbutton.y >= (signed)-b && e->xbutton.x < (signed)(w+b) &&