frame_adjust_area(self, TRUE, TRUE);
/* set all the windows for the frame in the client_map */
- g_hash_table_insert(client_map, (gpointer)self->frame.window, client);
- g_hash_table_insert(client_map, (gpointer)self->frame.plate, client);
- g_hash_table_insert(client_map, (gpointer)self->title, client);
- g_hash_table_insert(client_map, (gpointer)self->label, client);
- g_hash_table_insert(client_map, (gpointer)self->max, client);
- g_hash_table_insert(client_map, (gpointer)self->close, client);
- g_hash_table_insert(client_map, (gpointer)self->desk, client);
- g_hash_table_insert(client_map, (gpointer)self->icon, client);
- g_hash_table_insert(client_map, (gpointer)self->iconify, client);
- g_hash_table_insert(client_map, (gpointer)self->handle, client);
- g_hash_table_insert(client_map, (gpointer)self->lgrip, client);
- g_hash_table_insert(client_map, (gpointer)self->rgrip, client);
+ g_hash_table_insert(client_map, &self->frame.window, client);
+ g_hash_table_insert(client_map, &self->frame.plate, client);
+ g_hash_table_insert(client_map, &self->title, client);
+ g_hash_table_insert(client_map, &self->label, client);
+ g_hash_table_insert(client_map, &self->max, client);
+ g_hash_table_insert(client_map, &self->close, client);
+ g_hash_table_insert(client_map, &self->desk, client);
+ g_hash_table_insert(client_map, &self->icon, client);
+ g_hash_table_insert(client_map, &self->iconify, client);
+ g_hash_table_insert(client_map, &self->handle, client);
+ g_hash_table_insert(client_map, &self->lgrip, client);
+ g_hash_table_insert(client_map, &self->rgrip, client);
}
void frame_release_client(ObFrame *self, Client *client)
}
/* remove all the windows for the frame from the client_map */
- g_hash_table_remove(client_map, (gpointer)self->frame.window);
- g_hash_table_remove(client_map, (gpointer)self->frame.plate);
- g_hash_table_remove(client_map, (gpointer)self->title);
- g_hash_table_remove(client_map, (gpointer)self->label);
- g_hash_table_remove(client_map, (gpointer)self->max);
- g_hash_table_remove(client_map, (gpointer)self->close);
- g_hash_table_remove(client_map, (gpointer)self->desk);
- g_hash_table_remove(client_map, (gpointer)self->icon);
- g_hash_table_remove(client_map, (gpointer)self->iconify);
- g_hash_table_remove(client_map, (gpointer)self->handle);
- g_hash_table_remove(client_map, (gpointer)self->lgrip);
- g_hash_table_remove(client_map, (gpointer)self->rgrip);
+ g_hash_table_remove(client_map, &self->frame.window);
+ g_hash_table_remove(client_map, &self->frame.plate);
+ g_hash_table_remove(client_map, &self->title);
+ g_hash_table_remove(client_map, &self->label);
+ g_hash_table_remove(client_map, &self->max);
+ g_hash_table_remove(client_map, &self->close);
+ g_hash_table_remove(client_map, &self->desk);
+ g_hash_table_remove(client_map, &self->icon);
+ g_hash_table_remove(client_map, &self->iconify);
+ g_hash_table_remove(client_map, &self->handle);
+ g_hash_table_remove(client_map, &self->lgrip);
+ g_hash_table_remove(client_map, &self->rgrip);
frame_free(self);
}
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()
{
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) {
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) {
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*/) {