X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Fevent.c;h=a4090b0c4d5a210d5cd0dd9b1b194e8803de2511;hb=a3f8c5c45a1ff323fc088cc5af49ab48d5679e54;hp=bb6a42f964de889d8ec1d3d3d907d067c3d7efb3;hpb=f506cbceae9e3d41f1e6e09d7c5e83ab3935adf9;p=chaz%2Fopenbox diff --git a/openbox/event.c b/openbox/event.c index bb6a42f9..a4090b0c 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -43,7 +43,6 @@ #include "translate.h" #include -#include #include #include @@ -504,6 +503,7 @@ static void event_process(const XEvent *ec, gpointer data) frame_adjust_focus(client->frame, TRUE); focus_set_client(client); client_calc_layer(client); + client_bring_helper_windows(client); } } else if (e->type == FocusOut) { gboolean nomove = FALSE; @@ -676,7 +676,7 @@ void event_enter_client(ObClient *client) { g_assert(config_focus_follow); - if (client_normal(client) && client_can_focus(client)) { + if (client_enter_focusable(client) && client_can_focus(client)) { if (config_focus_delay) { ObFocusDelayData *data; @@ -709,8 +709,15 @@ static void event_handle_client(ObClient *client, XEvent *e) case ButtonPress: case ButtonRelease: /* Wheel buttons don't draw because they are an instant click, so it - is a waste of resources to go drawing it. */ - if (!(e->xbutton.button == 4 || e->xbutton.button == 5)) { + is a waste of resources to go drawing it. + if the user is doing an intereactive thing, or has a menu open then + the mouse is grabbed (possibly) and if we get these events we don't + want to deal with them + */ + if (!(e->xbutton.button == 4 || e->xbutton.button == 5) && + !keyboard_interactively_grabbed() && + !menu_frame_visible) + { con = frame_context(client, e->xbutton.window); con = mouse_button_frame_context(con, e->xbutton.button); switch (con) { @@ -1039,9 +1046,10 @@ static void event_handle_client(ObClient *client, XEvent *e) (e->xclient.data.l[0] == 2 ? "user" : "INVALID")))); /* XXX make use of data.l[2] !? */ event_curtime = e->xclient.data.l[1]; - ob_debug_type(OB_DEBUG_APP_BUGS, - "_NET_ACTIVE_WINDOW message for window %s is " - "missing a timestamp\n", client->title); + if (event_curtime == 0) + ob_debug_type(OB_DEBUG_APP_BUGS, + "_NET_ACTIVE_WINDOW message for window %s is " + "missing a timestamp\n", client->title); client_activate(client, FALSE, (e->xclient.data.l[0] == 0 || e->xclient.data.l[0] == 2));