From 911ad76372394715f7eae88c96eeb6d06396f3be Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 22 Apr 2007 19:35:50 +0000 Subject: [PATCH] a) set the focus client before calculating its layer b) cleanup in focus.c --- openbox/event.c | 2 +- openbox/focus.c | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/openbox/event.c b/openbox/event.c index c8356be1..f276a079 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -471,8 +471,8 @@ static void event_process(const XEvent *ec, gpointer data) focus_fallback(TRUE); } else if (client && client != focus_client) { frame_adjust_focus(client->frame, TRUE); - client_calc_layer(client); focus_set_client(client); + client_calc_layer(client); } } else if (e->type == FocusOut) { gboolean nomove = FALSE; diff --git a/openbox/focus.c b/openbox/focus.c index 7a686800..afedd000 100644 --- a/openbox/focus.c +++ b/openbox/focus.c @@ -259,10 +259,6 @@ ObClient* focus_fallback_target(gboolean allow_refocus, ObClient *old) void focus_fallback(gboolean allow_refocus) { ObClient *new; - ObClient *old; - - /* save this before moving focus away to nothing */ - old = focus_client; /* unfocus any focused clients.. they can be focused by Pointer events and such, and then when I try focus them, I won't get a FocusIn event @@ -270,7 +266,7 @@ void focus_fallback(gboolean allow_refocus) */ focus_nothing(); - if ((new = focus_fallback_target(allow_refocus, old))) + if ((new = focus_fallback_target(allow_refocus, focus_client))) client_focus(new); } -- 2.45.2