summaryrefslogtreecommitdiff
path: root/openbox/client.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-03-24 22:03:38 +0000
committerDana Jansens <danakj@orodu.net>2003-03-24 22:03:38 +0000
commitd56e90fac8e821f3773372e9342d60de169963b9 (patch)
tree97df7d75b9f33f9544e114a893a3328e474f9114 /openbox/client.c
parent3443454f33f88e10f187b78594ecfb5c09e1448d (diff)
use g_hash_table properly
Diffstat (limited to 'openbox/client.c')
-rw-r--r--openbox/client.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/openbox/client.c b/openbox/client.c
index de1b2c9c..e47742a6 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -38,8 +38,8 @@ static Client *search_focus_tree(Client *node, Client *skip);
static void client_apply_startup_state(Client *self);
static Client *search_modal_tree(Client *node, Client *skip);
-static guint map_hash(Window w) { return w; }
-static gboolean map_key_comp(Window w1, Window w2) { return w1 == w2; }
+static guint map_hash(Window *w) { return *w; }
+static gboolean map_key_comp(Window *w1, Window *w2) { return *w1 == *w2; }
void client_startup()
{
@@ -186,8 +186,8 @@ void client_manage(Window window)
client_list = g_slist_append(client_list, client);
stacking_list = g_list_append(stacking_list, client);
- g_assert(!g_hash_table_lookup(client_map, (gpointer)client->window));
- g_hash_table_insert(client_map, (gpointer)window, client);
+ g_assert(!g_hash_table_lookup(client_map, &client->window));
+ g_hash_table_insert(client_map, &client->window, client);
/* update the focus lists */
if (client->desktop == DESKTOP_ALL) {
@@ -241,7 +241,7 @@ void client_unmanage(Client *client)
client_list = g_slist_remove(client_list, client);
stacking_list = g_list_remove(stacking_list, client);
- g_hash_table_remove(client_map, (gpointer)client->window);
+ g_hash_table_remove(client_map, &client->window);
/* update the focus lists */
if (client->desktop == DESKTOP_ALL) {
@@ -528,7 +528,7 @@ void client_update_transient_for(Client *self)
if (XGetTransientForHint(ob_display, self->window, &t) &&
t != self->window) { /* cant be transient to itself! */
self->transient = TRUE;
- c = g_hash_table_lookup(client_map, (gpointer)t);
+ c = g_hash_table_lookup(client_map, &t);
g_assert(c != self);/* if this happens then we need to check for it*/
if (!c /*XXX: && _group*/) {