X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fgroup.c;h=fe3fa57532203e171b0bdf2a30a012d4680efd78;hb=fcdcd0fab4141d2d8bc1c156096ac5dbedbeaf61;hp=69d2ccb2a9126b18ee621916a8de2b359072db10;hpb=5f42ecfacbbf0bcfe43137c51a20b60d8ea368e3;p=chaz%2Fopenbox diff --git a/openbox/group.c b/openbox/group.c index 69d2ccb2..fe3fa575 100644 --- a/openbox/group.c +++ b/openbox/group.c @@ -6,37 +6,39 @@ GHashTable *group_map = NULL; static guint map_hash(Window *w) { return *w; } static gboolean map_key_comp(Window *w1, Window *w2) { return *w1 == *w2; } -void group_startup() +void group_startup(gboolean reconfig) { + if (reconfig) return; + group_map = g_hash_table_new((GHashFunc)map_hash, (GEqualFunc)map_key_comp); } -void group_shutdown() +void group_shutdown(gboolean reconfig) { + if (reconfig) return; + g_hash_table_destroy(group_map); } -Group *group_add(Window leader, Client *client) +ObGroup *group_add(Window leader, ObClient *client) { - Group *self; + ObGroup *self; self = g_hash_table_lookup(group_map, &leader); if (self == NULL) { - self = g_new(Group, 1); + self = g_new(ObGroup, 1); self->leader = leader; self->members = NULL; g_hash_table_insert(group_map, &self->leader, self); - g_message("NEW GROUP FOR %lx", leader); - } else - g_message("REUSING GROUP FOR %lx", leader); + } self->members = g_slist_append(self->members, client); return self; } -void group_remove(Group *self, Client *client) +void group_remove(ObGroup *self, ObClient *client) { self->members = g_slist_remove(self->members, client); if (self->members == NULL) {