]> Dogcows Code - chaz/openbox/blobdiff - openbox/action.c
revert 7246 and simplify action_raiselower a bit, turns out 7246 wasn't needed for...
[chaz/openbox] / openbox / action.c
index 6e4cd186ed8d6642e4c5d78e2ac5a0a6e6c2bcb1..39c1169b3f8f996b0e9e97a6154543ee3deb7fbe 100644 (file)
@@ -1311,7 +1311,7 @@ void action_focus(union ActionData *data)
 void action_unfocus (union ActionData *data)
 {
     if (data->client.any.c == focus_client)
-        focus_fallback(FALSE);
+        focus_fallback(FALSE, FALSE);
 }
 
 void action_iconify(union ActionData *data)
@@ -1329,31 +1329,10 @@ void action_focus_order_to_bottom(union ActionData *data)
 void action_raiselower(union ActionData *data)
 {
     ObClient *c = data->client.any.c;
-    GList *it;
-    gboolean raise = FALSE;
-
-    for (it = stacking_list; it; it = g_list_next(it)) {
-        if (WINDOW_IS_CLIENT(it->data)) {
-            ObClient *cit = it->data;
-
-            if (cit == c) break;
-            if (client_normal(cit) == client_normal(c) &&
-                cit->layer == c->layer &&
-                cit->frame->visible &&
-                !client_search_transient(c, cit))
-            {
-                if (RECT_INTERSECTS_RECT(cit->frame->area, c->frame->area)) {
-                    raise = TRUE;
-                    break;
-                }
-            }
-        }
-    }
 
-    if (raise)
-        action_raise(data);
-    else
-        action_lower(data);
+    client_action_start(data);
+    stacking_restack_request(c, NULL, Opposite, FALSE);
+    client_action_end(data);
 }
 
 void action_raise(union ActionData *data)
This page took 0.022819 seconds and 4 git commands to generate.