all repos — openbox @ 47529e777f5d0ac222b6ed06c9644c3909bd6479

openbox fork - make it a bit more like ryudo

revert 7246 and simplify action_raiselower a bit, turns out 7246 wasn't needed for that after all
Mikael Magnusson mikachu@comhem.se
commit

47529e777f5d0ac222b6ed06c9644c3909bd6479

parent

3547fe26edf0671dbc0ec5b3a081f8629d13e4b9

3 files changed, 9 insertions(+), 36 deletions(-)

jump to
M openbox/action.copenbox/action.c

@@ -1329,31 +1329,10 @@

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)
M openbox/stacking.copenbox/stacking.c

@@ -545,8 +545,8 @@ }

return occludes; } -gboolean stacking_restack_request(ObClient *client, ObClient *sibling, - gint detail, gboolean activate) +void stacking_restack_request(ObClient *client, ObClient *sibling, + gint detail, gboolean activate) { switch (detail) { case Below:

@@ -563,8 +563,6 @@ /* if this client occludes sibling (or anything if NULL), then

lower it to the bottom */ if (stacking_occludes(client, sibling)) stacking_lower(CLIENT_AS_WINDOW(client)); - else - return FALSE; break; case Above: ob_debug("Restack request Above for client %s sibling %s\n",

@@ -586,8 +584,7 @@ for this */

client_activate(client, FALSE, TRUE); else stacking_raise(CLIENT_AS_WINDOW(client)); - } else - return FALSE; + } break; case Opposite: ob_debug("Restack request Opposite for client %s sibling "

@@ -605,5 +602,4 @@ else if (stacking_occludes(client, sibling))

stacking_lower(CLIENT_AS_WINDOW(client)); break; } - return TRUE; }
M openbox/stacking.hopenbox/stacking.h

@@ -67,13 +67,11 @@ windows

@param detail One of Above, Below, TopIf, BottomIf, Opposite @param activate If TRUE, and if the window is going to be raised, it will be activated instead - @return false if given TopIf or BottomIf and no action was taken, - true otherwise See http://tronche.com/gui/x/xlib/window/configure.html for details on how each detail works with and without a sibling. */ -gboolean stacking_restack_request(struct _ObClient *client, - struct _ObClient *sibling, - gint detail, gboolean activate); +void stacking_restack_request(struct _ObClient *client, + struct _ObClient *sibling, + gint detail, gboolean activate); #endif