From f37382b66d89f9ecc7bdbe9be3dd6122d56790a8 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 22 Apr 2007 20:40:22 +0000 Subject: [PATCH] focus properly on desktop change --- openbox/screen.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/openbox/screen.c b/openbox/screen.c index a54b2b56..c0569c29 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -460,10 +460,14 @@ void screen_set_desktop(guint num) } } - /* reduce flicker by hiliting now rather than waiting for the server - FocusIn event */ - if ((c = focus_fallback_target(TRUE, focus_client))) + /* have to try focus here because when you leave an empty desktop + there is no focus out to watch for */ + if ((c = focus_fallback_target(TRUE, focus_client))) { + /* reduce flicker by hiliting now rather than waiting for the server + FocusIn event */ frame_adjust_focus(c->frame, TRUE); + client_focus(c); + } event_ignore_queued_enters(); } -- 2.39.2