X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fstacking.c;h=287de4f0658ed01cf62ccb844cf15c21a529ab5c;hb=dc9c39d042c186126d83124ef815451a492fedb2;hp=791414ffac8af761021f32589eb652967e2b0d20;hpb=db50fd3026ccd9e97755448d41ff87fbed036ab9;p=chaz%2Fopenbox diff --git a/openbox/stacking.c b/openbox/stacking.c index 791414ff..287de4f0 100644 --- a/openbox/stacking.c +++ b/openbox/stacking.c @@ -1,3 +1,21 @@ +/* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*- + + stacking.c for the Openbox window manager + Copyright (c) 2003 Ben Jansens + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + See the COPYING file for a copy of the GNU General Public License. +*/ + #include "openbox.h" #include "prop.h" #include "screen.h" @@ -210,7 +228,6 @@ static GList *pick_windows(ObClient *top, ObClient *selected, gboolean raise) return ret; } -#if 0 static GList *pick_group_windows(ObClient *top, ObClient *selected, gboolean raise) { @@ -228,18 +245,31 @@ static GList *pick_group_windows(ObClient *top, ObClient *selected, next = g_list_next(it); if ((sit = g_slist_find(top->group->members, it->data))) { + ObClient *c; + ObClientType t; + ++i; - ret = g_list_concat(ret, - pick_windows(sit->data, selected, raise)); - /* if we dont have a prev then start back at the beginning, - otherwise skip back to the prev's next */ - next = prev ? g_list_next(prev) : stacking_list; + c = it->data; + t = c->type; + + if ((c->desktop == selected->desktop || + c->desktop == DESKTOP_ALL) && + (t == OB_CLIENT_TYPE_TOOLBAR || + t == OB_CLIENT_TYPE_MENU || + t == OB_CLIENT_TYPE_UTILITY)) + { + ret = g_list_concat(ret, + pick_windows(sit->data, + selected, raise)); + /* if we dont have a prev then start back at the beginning, + otherwise skip back to the prev's next */ + next = prev ? g_list_next(prev) : stacking_list; + } } } } return ret; } -#endif void stacking_raise(ObWindow *window) { @@ -251,7 +281,7 @@ void stacking_raise(ObWindow *window) selected = WINDOW_AS_CLIENT(window); c = client_search_top_transient(selected); wins = pick_windows(c, selected, TRUE); - /*wins = g_list_concat(wins, pick_group_windows(c, selected, TRUE));*/ + wins = g_list_concat(wins, pick_group_windows(c, selected, TRUE)); } else { wins = g_list_append(NULL, window); stacking_list = g_list_remove(stacking_list, window); @@ -270,7 +300,7 @@ void stacking_lower(ObWindow *window) selected = WINDOW_AS_CLIENT(window); c = client_search_top_transient(selected); wins = pick_windows(c, selected, FALSE); - /*wins = g_list_concat(pick_group_windows(c, selected, FALSE), wins);*/ + wins = g_list_concat(pick_group_windows(c, selected, FALSE), wins); } else { wins = g_list_append(NULL, window); stacking_list = g_list_remove(stacking_list, window);