X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fevent.c;h=c54c2952c62ae88359fc4bbe4273251b03f32c49;hb=05e52e3c8e7d694b2ec977279655d467db4c07c6;hp=478567f3f3d2051d285bc7d8708586f44d90a643;hpb=b1fe0dbbc2ef4472ac8893d9b3b20e9cb149af6d;p=chaz%2Fopenbox diff --git a/openbox/event.c b/openbox/event.c index 478567f3..c54c2952 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -341,14 +341,33 @@ static gboolean event_ignore(XEvent *e, Client *client) g_message("found pending FocusIn"); #endif /* is the focused window getting a FocusOut/In back to - itself? */ + itself? + */ if (fe.xfocus.window == e->xfocus.window && !event_ignore(&fe, client)) { + /* + if focus_client is not set, then we can't do + this. we need the FocusIn. This happens in the + case when the set_focus_client(NULL) in the + focus_fallback function fires and then + focus_fallback picks the currently focused + window (such as on a SendToDesktop-esque action. + */ + if (focus_client) { #ifdef DEBUG_FOCUS - g_message("focused window got an Out/In back to " - "itself IGNORED both"); + g_message("focused window got an Out/In back to " + "itself IGNORED both"); #endif - return TRUE; + return TRUE; + } else { + event_process(&fe); +#ifdef DEBUG_FOCUS + g_message("focused window got an Out/In back to " + "itself but focus_client was null " + "IGNORED just the Out"); +#endif + return TRUE; + } } /* once all the FocusOut's have been dealt with, if there @@ -680,7 +699,7 @@ static void event_handle_client(Client *client, XEvent *e) corner = Corner_TopLeft; } - client_configure(client, corner, x, y, w, h, FALSE, FALSE); + client_configure(client, corner, x, y, w, h, FALSE, TRUE); } if (e->xconfigurerequest.value_mask & CWStackMode) {