X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fgroup.c;h=fe3fa57532203e171b0bdf2a30a012d4680efd78;hb=8fe0cb8989c1fe12b30b9030b446345f25340d35;hp=0a03aeefb8124f5b8b0525419499739e437d7334;hpb=2477a38d2f3063b697e44bf3690cf280fb26ca8a;p=chaz%2Fopenbox diff --git a/openbox/group.c b/openbox/group.c index 0a03aeef..fe3fa575 100644 --- a/openbox/group.c +++ b/openbox/group.c @@ -6,24 +6,28 @@ 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, ObClient *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); @@ -34,7 +38,7 @@ Group *group_add(Window leader, ObClient *client) return self; } -void group_remove(Group *self, ObClient *client) +void group_remove(ObGroup *self, ObClient *client) { self->members = g_slist_remove(self->members, client); if (self->members == NULL) {