X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fscreen.c;h=d2fe9c5bc4196f2c7e30f9993d2633fcf600f6ad;hb=0ba8c17565a7d3bb7f376ba5d072e0b70e96dec1;hp=f7c71abe07d0445c166595ea5b6889b9f6f93ff2;hpb=51780c10eae4d9e7920efdb840fd4a07a5f03c8e;p=chaz%2Fopenbox diff --git a/openbox/screen.c b/openbox/screen.c index f7c71abe..d2fe9c5b 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -418,7 +418,6 @@ void screen_set_desktop(guint num) { GList *it; guint old; - ObClient *target; g_assert(num < screen_num_desktops); @@ -458,17 +457,17 @@ void screen_set_desktop(guint num) event_ignore_queued_enters(); - target = focus_fallback_target(OB_FOCUS_FALLBACK_NOFOCUS); - if (target) { - frame_adjust_focus(target->frame, TRUE); + focus_hilite = focus_fallback_target(OB_FOCUS_FALLBACK_NOFOCUS); + if (focus_hilite) { + frame_adjust_focus(focus_hilite->frame, TRUE); /*! When this focus_client check is not used, you can end up with races, as demonstrated with gnome-panel, sometmies the window you click on another desktop ends up losing focus cuz of the focus change here. */ - if (!focus_client) - client_focus(target); + /*if (!focus_client)*/ + client_focus(focus_hilite); } }