X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fscreen.c;h=05c292a2bb9f3098177d27e30d2444008b68c97a;hb=f5f59cea71b42ac462a8d30122646b79462e6499;hp=f7c71abe07d0445c166595ea5b6889b9f6f93ff2;hpb=51780c10eae4d9e7920efdb840fd4a07a5f03c8e;p=chaz%2Fopenbox diff --git a/openbox/screen.c b/openbox/screen.c index f7c71abe..05c292a2 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -74,6 +74,8 @@ static gboolean replace_wm() g_free(wm_sn); current_wm_sn_owner = XGetSelectionOwner(ob_display, wm_sn_atom); + if (current_wm_sn_owner == screen_support_win) + current_wm_sn_owner = None; if (current_wm_sn_owner) { if (!ob_replace_wm) { g_warning("A window manager is already running on screen %d", @@ -418,7 +420,6 @@ void screen_set_desktop(guint num) { GList *it; guint old; - ObClient *target; g_assert(num < screen_num_desktops); @@ -458,17 +459,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); } }