]> Dogcows Code - chaz/openbox/blobdiff - openbox/screen.c
raise windows when they change modality
[chaz/openbox] / openbox / screen.c
index f7c71abe07d0445c166595ea5b6889b9f6f93ff2..05c292a2bb9f3098177d27e30d2444008b68c97a 100644 (file)
@@ -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);
     }
 }
 
This page took 0.020895 seconds and 4 git commands to generate.